https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78946
Bug ID: 78946 Summary: optimization throws internal compiler error for uint64_t on AVR Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: tho...@maier-komor.de Target Milestone: --- Created attachment 40427 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40427&action=edit set of testcase files, compile testcase.cc with -O2 to reproduce ICE The attached code produces for optimization levels -O2 an internal compiler error while it works without an issue for -Os. this is at least with gcc-4.9.2 and 6.3.0 thomas@glaskugel:~/avr/arduino-mini/sensor1$ /opt/local/bin/avr-g++ --version avr-g++ (GCC) 6.3.0 Copyright (C) 2016 Free Software Foundation, Inc. Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es gibt KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE. thomas@glaskugel:~/avr/arduino-mini/sensor1$ /opt/local/bin/avr-g++ -c -I/usr/lib/avr/include -O2 testcase.cc testcase.cc: In Elementfunktion »size_t Sensor_AD::fromMemory(const void*, size_t)«: testcase.cc:127:1: Fehler: unerkennbarer Befehl: } ^ (insn 58 57 59 6 (parallel [ (set (reg:HI 84) (minus:HI (subreg:HI (subreg:SI (reg:DI 81) 0) 0) (reg:HI 82))) (clobber (scratch:QI)) ]) testcase.cc:74 -1 (nil)) testcase.cc:127:1: interner Compiler-Fehler: in extract_insn, bei recog.c:2287 0xa1abd8 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-6.3.0/gcc/rtl-error.c:108 0xa1ac09 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc-6.3.0/gcc/rtl-error.c:116 0x9f0c99 extract_insn(rtx_insn*) ../../gcc-6.3.0/gcc/recog.c:2287 0x84eb83 instantiate_virtual_regs_in_insn ../../gcc-6.3.0/gcc/function.c:1582 0x84eb83 instantiate_virtual_regs ../../gcc-6.3.0/gcc/function.c:1950 0x84eb83 execute ../../gcc-6.3.0/gcc/function.c:1999 Bitte senden Sie einen vollständigen Fehlerbericht auf Englisch ein; inclusive vorverarbeitetem Quellcode, wenn es dienlich ist. Please include the complete backtrace with any bug report. Siehe <http://gcc.gnu.org/bugs.html> für nähere Anweisungen. thomas@glaskugel:~/avr/arduino-mini/sensor1$ avr-g++ --version avr-g++ (GCC) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. thomas@glaskugel:~/avr/arduino-mini/sensor1$ avr-g++ -c -O2 testcase.cc testcase.cc: In member function ‘size_t Sensor_AD::fromMemory(const void*, size_t)’: testcase.cc:127:1: error: unrecognizable insn: } ^ (insn 58 57 59 6 (parallel [ (set (reg:HI 85) (minus:HI (subreg:HI (subreg:SI (reg:DI 82) 0) 0) (reg:HI 83))) (clobber (scratch:QI)) ]) testcase.cc:74 -1 (nil)) testcase.cc:127:1: internal compiler error: in extract_insn, at recog.c:2202 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.