This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[lno] loop-optimize2 ICE
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 26 Feb 2004 19:43:18 +0200
- Subject: [lno] loop-optimize2 ICE
Got a loop-optimize2 ICE on SPEC's bzip2:
========
gcc -c -o bzip2.o -O3 -floop-optimize2 bzip2.c
GNU C version 3.5-tree-ssa-lno 20040225 (merged 20040221)
(powerpc-apple-darwin7.0.0)
compiled by GNU C version 3.5-tree-ssa-lno 20040225 (merged
20040221).
bzip2.c: In function `undoReversibleTransformation_small':
bzip2.c:2585: internal compiler error: in trunc_int_for_mode, at
explow.c:54
========
Below is the smallest test case I came up with ("ttt.c"), and some more
details.
The same problem comes up in gap (aggroup.c), crafty (iterate.c) and gcc
(function.c).
dorit
ttt.c:
========
int last;
void undoReversibleTransformation_small (int dst, unsigned char z)
{
int retVal;
int i2, ch2;
i2 = 0;
ch2 = 256;
while ( i2 <= last ) {
int j2;
for (j2 = 0; j2 < (int)z; j2++) {
if (dst) retVal = foo (ch2, dst);
}
}
}
========
gcc -c -o bzip2.o -O3 -floop-optimize2 ttt.c
(gdb)
Breakpoint 1, trunc_int_for_mode (c=0, mode=CCmode) at
../../gcc/gcc/explow.c:53
53 in ../../gcc/gcc/explow.c
(gdb) backtrace
#0 trunc_int_for_mode (c=0, mode=CCmode) at ../../gcc/gcc/explow.c:53
#1 0x0021c234 in simplify_binary_operation (code=UNKNOWN, mode=CCmode,
op0=0x0, op1=0x40f1e400) at ../../gcc/gcc/simplify-rtx.c:2205
#2 0x0021c234 in simplify_binary_operation (code=UNKNOWN, mode=CCmode,
op0=0x0, op1=0x40f1e400) at ../../gcc/gcc/simplify-rtx.c:2205
#3 0x0021f3e0 in simplify_gen_binary (code=UNKNOWN, mode=VOIDmode,
op0=0x0, op1=0x0) at ../../gcc/gcc/simplify-rtx.c:85
#4 0x003b6eb0 in get_iv_value (iv=0x0, iteration=0x0) at
../../gcc/gcc/loop-iv.c:1151
#5 0x002ee2ac in unswitch_single_loop (loops=0x0, loop=<incomplete type>,
cond_checked=0x0, num=0) at ../../gcc/gcc/loop-unswitch.c:189
#6 0x002ee808 in unswitch_loops (loops=0x0) at
../../gcc/gcc/loop-unswitch.c:134
#7 0x00095aa8 in rest_of_handle_loop2 (decl=0x40e02cd0, insns=0x40f208c0)
at ../../gcc/gcc/toplev.c:2985
#8 0x00096294 in rest_of_compilation (decl=0x545904) at
../../gcc/gcc/toplev.c:3279
#9 0x001e4604 in tree_rest_of_compilation (fndecl=0x40e02cd0,
nested_p=false) at ../../gcc/gcc/tree-optimize.c:594
#10 0x0001c8f8 in c_expand_body_1 (fndecl=0x545904, nested_p=0) at
../../gcc/gcc/c-decl.c:6204
#11 0x0001cb64 in c_expand_body (fndecl=0x0) at ../../gcc/gcc/c-decl.c:6236
#12 0x001db7a0 in cgraph_expand_function (node=0x40f208c0) at
../../gcc/gcc/cgraphunit.c:782
#13 0x001dcd08 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1664
#14 0x00057d60 in c_objc_common_finish_file () at
../../gcc/gcc/c-objc-common.c:243
#15 0x0004f450 in c_common_parse_file (set_yydebug=0) at
../../gcc/gcc/c-opts.c:1239
#16 0x000986bc in toplev_main (argc=5517644, argv=0x1) at
../../gcc/gcc/toplev.c:1871
#17 0x00068700 in main (argc=0, argv=0x0) at ../../gcc/gcc/main.c:35
(gdb) n
(gdb) n
(gdb) n
(gdb) n
(gdb) n
tt.c: In function `undoReversibleTransformation_small':
tt.c:16: internal compiler error: in trunc_int_for_mode, at explow.c:54