https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70442
Bug ID: 70442 Summary: gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "extract_insn" Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: helloqirun at gmail dot com Target Milestone: --- The following valid code causes an ICE when compiled with the current gcc trunk at -O2 and above on x86_64-linux-gnu in both 32-bit mode only. It should be a 6 regression. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 6.0.0 20160329 (experimental) [trunk revision 234517] (GCC) $ gcc-trunk -m32 -O2 abc.c abc.c: In function ‘fn1’: abc.c:11:1: error: unrecognizable insn: } ^ (insn 17 16 27 2 (set (subreg:V2DI (reg/v:DI 92 [ b ]) 0) (reg/v:DI 87 [ b ])) abc.c:9 -1 (expr_list:REG_DEAD (reg/v:DI 87 [ b ]) (nil))) abc.c:11:1: internal compiler error: in extract_insn, at recog.c:2287 0xaf5528 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/gcc/rtl-error.c:108 0xaf5559 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc/gcc/rtl-error.c:116 0xac2721 extract_insn(rtx_insn*) ../../gcc/gcc/recog.c:2287 0x1276dbe decompose_multiword_subregs ../../gcc/gcc/lower-subreg.c:1465 0x127803d execute ../../gcc/gcc/lower-subreg.c:1735 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. $ cat abc.c char a, c; void fn1() { long long b; long m; int d; switch (d) case 5: b = a; b ^= m; c = b >> b; }