Commit 94e3faf6 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/48739 (ICE in check_loop_closed_ssa_use() with…

re PR tree-optimization/48739 (ICE in check_loop_closed_ssa_use() with "-ftree-parallelize-loops=2 -fno-tree-dominator-opts")

	PR tree-optimization/48739
	* tree-ssa.c: Include cfgloop.h.
	(execute_update_addresses_taken): When updating ssa, if in
	loop closed SSA form, call rewrite_into_loop_closed_ssa instead of
	update_ssa.
	* Makefile.in (tree-ssa.o): Depend on $(CFGLOOP_H).

	* gcc.dg/pr48739-1.c: New test.
	* gcc.dg/pr48739-2.c: New test.

From-SVN: r177924
parent b9156642
2011-08-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/48739
* tree-ssa.c: Include cfgloop.h.
(execute_update_addresses_taken): When updating ssa, if in
loop closed SSA form, call rewrite_into_loop_closed_ssa instead of
update_ssa.
* Makefile.in (tree-ssa.o): Depend on $(CFGLOOP_H).
2011-08-19 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/49936
......
......@@ -2406,7 +2406,7 @@ tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_DUMP_H) langhooks.h $(TREE_PASS_H) $(BASIC_BLOCK_H) $(BITMAP_H) \
$(FLAGS_H) $(GGC_H) $(HASHTAB_H) pointer-set.h \
$(GIMPLE_H) $(TREE_INLINE_H) $(TARGET_H) tree-pretty-print.h \
gimple-pretty-print.h
gimple-pretty-print.h $(CFGLOOP_H)
tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
......
2011-08-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/48739
* gcc.dg/pr48739-1.c: New test.
* gcc.dg/pr48739-2.c: New test.
2011-08-20 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/graphite/interchange-1.f: Remove xfail.
......
/* PR tree-optimization/48739 */
/* { dg-do compile } */
/* { dg-require-effective-target pthread } */
/* { dg-options "-O1 -ftree-parallelize-loops=2 -fno-tree-dominator-opts" } */
extern int g;
extern void bar (void);
int
foo (int x)
{
int a, b, *c = (int *) 0;
for (a = 0; a < 10; ++a)
{
bar ();
for (b = 0; b < 5; ++b)
{
x = 0;
c = &x;
g = 1;
}
}
*c = x;
for (x = 0; x != 10; x++)
;
return g;
}
/* PR tree-optimization/48739 */
/* { dg-do compile } */
/* { dg-require-effective-target pthread } */
/* { dg-options "-O1 -ftree-parallelize-loops=2 -fno-tree-dominator-opts" } */
extern int g, v[10];
extern void bar (void);
int
foo (int x)
{
int a, b, *c = (int *) 0;
for (a = 0; a < 10; ++a)
{
bar ();
for (b = 0; b < 5; ++b)
{
x = 0;
c = &x;
g = 1;
}
}
*c = x;
for (x = 0; x != 10; x++)
v[x] = x;
return g;
}
......@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-dump.h"
#include "tree-pass.h"
#include "diagnostic-core.h"
#include "cfgloop.h"
/* Pointer map of variable mappings, keyed by edge. */
static struct pointer_map_t *edge_var_maps;
......@@ -2208,6 +2209,9 @@ execute_update_addresses_taken (void)
}
/* Update SSA form here, we are called as non-pass as well. */
if (number_of_loops () > 1 && loops_state_satisfies_p (LOOP_CLOSED_SSA))
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
else
update_ssa (TODO_update_ssa);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment