http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52113
Bug #: 52113 Summary: [4.7 regression][avr] ICE: in extract_insn, at recog.c:2123 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: mhlav...@redhat.com gcc 4.7 fails on code that was working in 4.6 without any problem Version: 4.7.0-20120128 Target: avr Problem happens only when optimization is used. Pre-processed reproducer: ============= cut ================= typedef unsigned int uint8_t __attribute__((__mode__(__QI__))); typedef unsigned int uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int uint32_t __attribute__ ((__mode__ (__SI__))); extern uint32_t inacCounter; uint8_t inactivityTimer; int main() { if(inacCounter>((uint32_t)inactivityTimer*1000)) inacCounter=0; } ============= cut ================= $ avr-g++ -c -mmcu=atmega64 reproducer.cpp -O1 reproducer.cpp: In function 'int main()': reproducer.cpp:11:1: error: unrecognizable insn: (insn 26 6 27 2 (set (concatn:HI [ (reg:QI 57) (reg:QI 58 [+1 ]) ]) (zero_extend:HI (reg:QI 48 [ inactivityTimer ]))) reproducer.cpp:10 -1 (nil)) reproducer.cpp:11:1: internal compiler error: in extract_insn, at recog.c:2123 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-20120128/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-2.fc16' --with-bugurl=https://bugzilla.redhat.com/ Thread model: single gcc version 4.7.0 20120128 (experimental) (Fedora 4.7-2.fc16)