http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48739
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-19 23:04:36 UTC --- (In reply to comment #1) > Simplified testcase: > > /* PR tree-optimization/48739 */ > /* { dg-do compile } */ > /* { 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; > } > > Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149206 > (before that the empty loop would be just removed). > > The bug seems to be that parloops pass requests TODO_rebuild_alias which > changes x from TREE_ADDRESSABLE to a gimple var, but we are in loop closed SSA > form at that point and nothing ensures that the optimized variable is put into > loop closed SSA form. The bug would be that TODO_rebuild_alias does a TODO_update_address_taken. But really parloops should be re-architected to not require a TODO_rebuild_alias ... (it isn't required anymore for correctness anyway)