https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80499
Bug ID: 80499 Summary: gcc ICE on RTL code on x86_64-linux-gnu in "extract_insn" Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: helloqirun at gmail dot com Target Milestone: --- The following valid RTL fragment causes an ICE when compiled with the current gcc trunk on x86_64-linux-gnu in 32-bit mode. The 64-bit mode works fine. $ gcc-trunk --version gcc-trunk (GCC) 8.0.0 20170423 (experimental) [trunk revision 247083] Copyright (C) 2017 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. $ gcc-trunk -m32 abc1.c abc1.c: In function ‘test_1’: abc1.c:20:1: error: unrecognizable insn: } ^ (insn 2 6 7 2 (set (mem:DI (pre_dec (reg/f:SI 7 sp)) [0 S8 A8]) (reg/f:SI 6 bp)) -1 (nil)) abc1.c:20:1: internal compiler error: in extract_insn, at recog.c:2311 0xb19d38 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/gcc/rtl-error.c:108 0xb19d69 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc/gcc/rtl-error.c:116 0xae7a6f extract_insn(rtx_insn*) ../../gcc/gcc/recog.c:2311 0xae7ac1 extract_insn_cached(rtx_insn*) ../../gcc/gcc/recog.c:2201 0x86a3a7 cleanup_subreg_operands(rtx_insn*) ../../gcc/gcc/final.c:3152 0x86c551 final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) ../../gcc/gcc/final.c:2948 0x86da21 final(rtx_insn*, _IO_FILE*, int) ../../gcc/gcc/final.c:2051 0x86df09 rest_of_handle_final ../../gcc/gcc/final.c:4489 0x86df09 execute ../../gcc/gcc/final.c:4562 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ cat abc1.c int __RTL (startwith ("final")) test_1 () { (function "" (insn-chain (block 2 (edge-from entry ) (cnote 6 [bb 2] NOTE_INSN_BASIC_BLOCK) (cinsn 2 (set (mem:DI (pre_dec(reg sp)) [0 ]) (reg bp)) ) ) (block 3 (cinsn 3 (parallel [ (set (reg ax ) (plus(reg ax ) (const_int 4))) ]) ) ) (block 4 (edge-from 2) (cnote 7 [bb 4] NOTE_INSN_BASIC_BLOCK) ) (cbarrier 0) ) ) }