https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82389
Bug ID: 82389 Summary: ICE on valid code on x86_64-linux-gnu: Segmentation fault Product: gcc Version: 8.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: --- It crashes at level -O3. Level -O2 works fine. $ 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/8.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 8.0.0 20171001 (experimental) [trunk revision 253328] (GCC) $ gcc-trunk -O3 -c abc.c during GIMPLE pass: dse abc.c: In function ‘fn1’: abc.c:1:6: internal compiler error: Segmentation fault void fn1() { ^~~ 0xd46f2f crash_signal ../../gcc/gcc/toplev.c:326 0x1473d19 bitmap_bit_in_range_p(simple_bitmap_def const*, unsigned int, unsigned int) ../../gcc/gcc/sbitmap.c:348 0x707f7f live_bytes_read ../../gcc/gcc/tree-ssa-dse.c:496 0x707f7f dse_classify_store ../../gcc/gcc/tree-ssa-dse.c:594 0xe2b95b dse_dom_walker::dse_optimize_stmt(gimple_stmt_iterator*) ../../gcc/gcc/tree-ssa-dse.c:785 0x708ac5 dse_dom_walker::before_dom_children(basic_block_def*) ../../gcc/gcc/tree-ssa-dse.c:852 0x1366d17 dom_walker::walk(basic_block_def*) ../../gcc/gcc/domwalk.c:308 0xe2b213 execute ../../gcc/gcc/tree-ssa-dse.c:906 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 void fn1() { short a[5]; int b = 3004363298; for (; b < 5; b++) a[b] = 0; fn1(a[3]); }