This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/48739] [4.5/4.6/4.7 Regression] ICE in check_loop_closed_ssa_use() with "-ftree-parallelize-loops=2 -fno-tree-dominator-opts"
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Aug 2011 16:38:45 +0000
- Subject: [Bug tree-optimization/48739] [4.5/4.6/4.7 Regression] ICE in check_loop_closed_ssa_use() with "-ftree-parallelize-loops=2 -fno-tree-dominator-opts"
- Auto-submitted: auto-generated
- References: <bug-48739-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48739
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |4.5.4
Summary|ICE in |[4.5/4.6/4.7 Regression]
|check_loop_closed_ssa_use() |ICE in
|with |check_loop_closed_ssa_use()
|"-ftree-parallelize-loops=2 |with
|-fno-tree-dominator-opts" |"-ftree-parallelize-loops=2
| |-fno-tree-dominator-opts"
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-19 16:38:45 UTC ---
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.