https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69771
Bug ID: 69771 Summary: ICE on x86_64-linux-gnu at -O0 (in extract_insn, at recog.c:2287) Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: chengniansun at gmail dot com Target Milestone: --- The following code crashes the gcc trunk in both 32-bit and 64-bit modes at -O0 on x86_64-linux-gnu. $: gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/usr/local/gcc-trunk --disable-bootstrap : (reconfigured) ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/usr/local/gcc-trunk --disable-bootstrap : (reconfigured) ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/usr/local/gcc-trunk --disable-bootstrap : (reconfigured) ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/usr/local/gcc-trunk --disable-bootstrap Thread model: posix gcc version 6.0.0 20160211 (experimental) [trunk revision 233350] (GCC) $: $: gcc-trunk small.c small.c: In function ¡®fn1¡¯: small.c:4:20: warning: right shift count is negative [-Wshift-count-negative] void fn1() { c = d >> ~(a || ~b); } ~~^~~~~~~~~~~~~ small.c:4:1: error: unrecognizable insn: void fn1() { c = d >> ~(a || ~b); } ^~~~ (insn 7 6 8 2 (set (reg:QI 91) (const_int 254 [0xfe])) small.c:4 -1 (nil)) small.c:4:1: internal compiler error: in extract_insn, at recog.c:2287 0xad889a _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-source-trunk/gcc/rtl-error.c:108 0xad88c9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc-source-trunk/gcc/rtl-error.c:116 0xaa5ce7 extract_insn(rtx_insn*) ../../gcc-source-trunk/gcc/recog.c:2287 0x883932 instantiate_virtual_regs_in_insn ../../gcc-source-trunk/gcc/function.c:1582 0x883932 instantiate_virtual_regs ../../gcc-source-trunk/gcc/function.c:1950 0x883932 execute ../../gcc-source-trunk/gcc/function.c:1999 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 small.c char a, c; unsigned short b; unsigned d; void fn1() { c = d >> ~(a || ~b); } int main() {} $: