https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64374
Bug ID: 64374 Summary: [5.0 regression] LTO ICE in extract_insn, at recog.c:2327 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: dimhen at gmail dot com r218764 PASS r218817 FAIL, r218991 FAIL Fedora 21 / x86_64 gcc -fpreprocessed -O3 -flto -c a.i -fPIC -DPIC -o a.o g++ -fpreprocessed -O3 -flto -c b.ii -fPIC -DPIC -o b.o g++ -fpreprocessed -O3 -flto -c e.ii -o e.o g++ -flto -o x a.o b.o e.o e.ii: In function ‘main’: e.ii:10:1: error: unrecognizable insn: } ^ (insn 52 13 16 3 (set (reg/f:DI 5 di [orig:98 D.3984 ] [98]) (plus:DI (reg:DI 0 ax [97]) (symbol_ref:DI ("mOID_Params") [flags 0x2] <var_decl 0x7fe0f905f900 mOID_Params>))) a.i:13 -1 (nil)) e.ii:10:1: internal compiler error: in extract_insn, at recog.c:2327 0xb230b8 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /home/dimhen/src/gcc_current/gcc/rtl-error.c:110 0xb23148 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) /home/dimhen/src/gcc_current/gcc/rtl-error.c:118 0xad96f8 extract_insn(rtx_insn*) /home/dimhen/src/gcc_current/gcc/recog.c:2327 0xad97a7 extract_insn_cached(rtx_insn*) /home/dimhen/src/gcc_current/gcc/recog.c:2218 0x86f8c9 cleanup_subreg_operands(rtx_insn*) /home/dimhen/src/gcc_current/gcc/final.c:3124 0xad51b9 split_insn /home/dimhen/src/gcc_current/gcc/recog.c:2937 0xadd3ad split_all_insns() /home/dimhen/src/gcc_current/gcc/recog.c:2991 0xadd4c8 rest_of_handle_split_after_reload /home/dimhen/src/gcc_current/gcc/recog.c:3938 0xadd4c8 execute /home/dimhen/src/gcc_current/gcc/recog.c:3967 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: fatal error: /usr/local/gcc_current/bin/g++ returned 1 exit status compilation terminated. /usr/bin/ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status $ /usr/local/gcc_current/bin/gcc -v Using built-in specs. COLLECT_GCC=/usr/local/gcc_current/bin/gcc COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /home/dimhen/src/gcc_current/configure --prefix=/usr/local/gcc_current/ --enable-checking=yes,df,rtl --enable-languages=c,c++,lto --enable-plugin=yes --enable-static Thread model: posix gcc version 5.0.0 20141220 (experimental) [trunk revision 218991] (GCC) $ cat a.i typedef struct {const int m} s; s ms[]; int i; int *Create ( ) { for ( ; ms[i].m; i++ ) f1 ( &ms[i] ); } $ cat b.ii extern "C" { typedef unsigned CPCCreate_t(int *, int); CPCCreate_t CPCCreate; int *Create(); } unsigned CPCCreate(int *, int) { Create(); } $ cat e.ii extern "C" { typedef unsigned CPCCreate_t(int, int); CPCCreate_t CPCCreate; } main() { CPCCreate(0, 0); for (;;) ; }