http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48739
Summary: ICE in check_loop_closed_ssa_use() with
"-ftree-parallelize-loops=2 -fno-tree-dominator-opts"
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 24077
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24077
Output of "ajo-gcc -w -O1 -ftree-parallelize-loops=2 -fno-tree-dominator-opts
-c test1942241936.c -v"
This reproduces for me with svn revision 172796 (2011-04-20), but it doesn't
reproduce with gcc-4.5. I'm on Ubuntu 10.10, x86-64. Attached "gcc-v.txt".
cat >test1942241936.c <<EOF
extern int g;
extern void func_48(void);
int func_70(int p) {
int a, b, *ptr = &g;
for (a = 0; a < 10; ++a) {
func_48();
for (b = 0; b < 5; ++b) {
for (g = 0; g < 1; ++g) {
p = 0;
ptr = &p;
}
}
}
*ptr = p;
for (p = 0; p != 10; p += 3u) { }
return g;
}
EOF
gcc -w -O1 -ftree-parallelize-loops=2 -fno-tree-dominator-opts -c
test1942241936.c
test1942241936.c: In function ‘func_70’:
test1942241936.c:3:5: internal compiler error: in check_loop_closed_ssa_use, at
tree-ssa-loop-manip.c:422
This test case is reduced from the output of Csmith
(http://embed.cs.utah.edu/csmith/), using the following command line:
csmith --bitfields --packed-struct -s 1942241936 >test1942241936.c
Notice that the final for-loop has undefined behavior due to signed integer
overflow, which might be putting the compiler in an unfamiliar state... but
surely it shouldn't *crash* the compiler! -fwrapv doesn't make the crash go
away, either.