http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52148
Bug #: 52148 Summary: [4.7 regression] ICE: in spill_failure, at reload1.c:2120 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: mhlav...@redhat.com Created attachment 26601 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26601 pre-processed reproducer gcc 4.7 fails on code that was working in 4.6 without any problem Version: 4.7.0-20120204 Target: avr Problem happens only when optimization (O2 or O3) is used. Pre-processed reproducer attached. $ avr-gcc -mmcu=atmega64 -O2 allsrce.cpp -c -o allsrc.o allsrce.cpp: In function 'void applyExpos(int16_t*, uint8_t)': allsrce.cpp:68:1: error: unable to find a register to spill in class 'POINTER_REGS' allsrce.cpp:68:1: error: this is the insn: (insn 17 16 9 2 (parallel [ (set (mem:BLK (reg:HI 26 r26) [0 A8]) (mem:BLK (reg/v/f:HI 97 [ anas ]) [0 A8])) (unspec [ (const_int 0 [0]) ] UNSPEC_MOVMEM) (use (reg:QI 24 r24 [99])) (clobber (reg:HI 26 r26)) (clobber (reg:HI 30 r30)) (clobber (reg:QI 0 r0)) (clobber (reg:QI 24 r24 [99])) ]) allsrce.cpp:49 29 {movmem_qi} (expr_list:REG_DEAD (reg:QI 24 r24 [99]) (expr_list:REG_DEAD (reg:QI 27 r27) (expr_list:REG_UNUSED (reg:QI 24 r24 [99]) (expr_list:REG_UNUSED (reg:QI 0 r0) (expr_list:REG_UNUSED (reg:HI 30 r30) (expr_list:REG_UNUSED (reg:HI 26 r26) (nil)))))))) allsrce.cpp:68:1: internal compiler error: in spill_failure, at reload1.c:2120 Please submit a full bug report, with preprocessed source if appropriate. Additional information: $ avr-gcc -v Using built-in specs. COLLECT_GCC=avr-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/avr/4.7.0/lto-wrapper Target: avr Configured with: ../gcc-4.7-20120204/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-system-zlib --enable-version-specific-runtime-libs --with-pkgversion='Fedora 4.7-0.fc16.1' --with-bugurl=https://bugzilla.redhat.com/ Thread model: single gcc version 4.7.0 20120204 (experimental) (Fedora 4.7-0.fc16.1)