http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53065
Bug #: 53065 Summary: ICE replace_reg_with_saved_mem, at caller-save.c:1125 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: web...@webbot.org.uk Created attachment 27213 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27213 Pre-processor output Environment: Windows 7 (64 bit). Compiler source v4.7.0 compiled under CygWin for "avr" target. avr-g++ -v -save-temps -g -Wall -Wextra -DF_CPU=8000000 -mmcu=atmega328p -gdwarf-2 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -fno-threadsafe-statics -fno-strict-aliasing -fwrapv -I"../../.." -Os -c -o AHRS.o AHRS.cpp outputs Using built-in specs. COLLECT_GCC=avr-g++ Target: avr Configured with: ../configure --target=avr --prefix=/cygdrive/c/avrgcc --with-gm p-lib=/usr/local/lib --with-mpfr-lib=/usr/local/lib --with-mpc-lib=/usr/local/li b --with-dwarf2 --enable-languages=c,c++ --disable-libssp --disable-nls Thread model: single gcc version 4.7.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-Wall' '-Wextra' '-D' 'F_CPU=800000 0' '-mmcu=atmega328p' '-gdwarf-2' '-fpack-struct' '-fshort-enums' '-funsigned-ch ar' '-funsigned-bitfields' '-fno-threadsafe-statics' '-fno-strict-aliasing' '-fw rapv' '-I' '../../..' '-Os' '-c' '-o' 'AHRS.o' /cygdrive/c/avrgcc/libexec/gcc/avr/4.7.0/cc1plus.exe -E -quiet -v -I ../../.. - imultilib avr5 -D F_CPU=8000000 AHRS.cpp -mmcu=atmega328p -Wall -Wextra -fpack-s truct -fshort-enums -funsigned-char -funsigned-bitfields -fno-threadsafe-statics -fno-strict-aliasing -fwrapv -g -gdwarf-2 -fworking-directory -Os -fpch-preproc ess -fno-rtti -fno-enforce-eh-specs -fno-exceptions -o AHRS.ii ignoring nonexistent directory "/cygdrive/c/avrgcc/lib/gcc/avr/4.7.0/../../../.. /avr/include/c++/4.7.0" ignoring nonexistent directory "/cygdrive/c/avrgcc/lib/gcc/avr/4.7.0/../../../.. /avr/include/c++/4.7.0/avr/avr5" ignoring nonexistent directory "/cygdrive/c/avrgcc/lib/gcc/avr/4.7.0/../../../.. /avr/include/c++/4.7.0/backward" ignoring nonexistent directory "/cygdrive/c/avrgcc/lib/gcc/avr/4.7.0/../../../.. /avr/sys-include" #include "..." search starts here: #include <...> search starts here: ../../.. /cygdrive/c/avrgcc/lib/gcc/avr/4.7.0/include /cygdrive/c/avrgcc/lib/gcc/avr/4.7.0/include-fixed /cygdrive/c/avrgcc/lib/gcc/avr/4.7.0/../../../../avr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-Wall' '-Wextra' '-D' 'F_CPU=800000 0' '-mmcu=atmega328p' '-gdwarf-2' '-fpack-struct' '-fshort-enums' '-funsigned-ch ar' '-funsigned-bitfields' '-fno-threadsafe-statics' '-fno-strict-aliasing' '-fw rapv' '-I' '../../..' '-Os' '-c' '-o' 'AHRS.o' /cygdrive/c/avrgcc/libexec/gcc/avr/4.7.0/cc1plus.exe -fpreprocessed AHRS.ii -qu iet -dumpbase AHRS.cpp -mmcu=atmega328p -auxbase-strip AHRS.o -g -gdwarf-2 -Os - Wall -Wextra -version -fpack-struct -fshort-enums -funsigned-char -funsigned-bit fields -fno-threadsafe-statics -fno-strict-aliasing -fwrapv -fno-rtti -fno-enfor ce-eh-specs -fno-exceptions -o AHRS.s GNU C++ (GCC) version 4.7.0 (avr) compiled by GNU C version 4.5.3, GMP version 5.0.4, MPFR version 3.1.0, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++ (GCC) version 4.7.0 (avr) compiled by GNU C version 4.5.3, GMP version 5.0.4, MPFR version 3.1.0, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 318bd707d55fc0ebdb58cccdc81ea14b AHRS.cpp:75:12: warning: unused parameter 'loopStart' [-Wunused-parameter] AHRS.cpp:95:12: warning: unused parameter 'loopCount' [-Wunused-parameter] AHRS.cpp:95:12: warning: unused parameter 'loopStart' [-Wunused-parameter] AHRS.cpp: In function 'void readSensors()': AHRS.cpp:297:1: internal compiler error: in replace_reg_with_saved_mem, at calle r-save.c:1125 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. I have attached the pre-processor output file AHRS.ii It will compile ok if the optimiser is set to -O0 or -O1 .