long long foo(void)
{
long long unsigned s=0;
long long unsigned b;
for (b = 0; b++, s == 0; )
{
s = b;
}
return s;
}
Compiled with -O2 -funroll-all-loops gives
internal compiler error: in apply_opt_in_copies, at loop-unroll.c:2122
The problematic line is:
gcc_assert (rtx_equal_p (PATTERN (insn), PATTERN (orig_insn)));
And PATTERN(insn) is
(parallel [
(set (reg/v:DI 32 [ b ])
(plus:DI (reg/v:DI 32 [ b ])
(const_int 1 [0x1])))
(clobber (scratch:SI))
])
This fails because rtx_equal_p thinks the two (scratch:SI) are different
scratch registers, and returns 0.
--
Summary: internal compiler error: in apply_opt_in_copies, at
loop-unroll.c:2122
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-checking
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pbrook at gcc dot gnu dot org
GCC target triplet: m68k-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24497