https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86104
Bug ID: 86104 Summary: gcc ICE at -O1 on x86_64-linux-gnu in "plus_constant", at explow.c:103 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: helloqirun at gmail dot com Target Milestone: --- It happens at 32-bit mode only. $ 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/9.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 9.0.0 20180610 (experimental) [trunk revision 261387] (GCC) $ gcc-trunk -m32 -O1 abc.c during RTL pass: dse1 abc.c: In function ‘times_two’: abc.c:16:1: internal compiler error: in plus_constant, at explow.c:103 } ^ 0x61289b plus_constant(machine_mode, rtx_def*, poly_int<1u, long>, bool) ../../gcc/gcc/explow.c:103 0x13e5e47 record_store ../../gcc/gcc/dse.c:1505 0x13e6a92 scan_insn ../../gcc/gcc/dse.c:2548 0x13e7912 dse_step1 ../../gcc/gcc/dse.c:2660 0x13e7912 rest_of_handle_dse ../../gcc/gcc/dse.c:3577 0x13e7912 execute ../../gcc/gcc/dse.c:3635 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 abc.c int __RTL (startwith ("vregs")) times_two (int i) { (function "" (param "i" (DECL_RTL (mem(plus) [0 ])) (DECL_RTL_INCOMING (reg di )) ) (insn-chain (block 2 (edge-from entry ) (cnote 4 [bb 2] NOTE_INSN_BASIC_BLOCK) (cinsn 2 (set (mem:SI (plus:DI (reg virtual-stack-vars) (const_int 4)) [1 i+A32]) (reg:SI di )) ) (edge-to exit (flags "FALLTHRU")) ) ) ) }