https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71483
Bug ID: 71483 Summary: g++ ICE at -O3 on valid code on x86_64-linux-gnu with “Floating point exception” Product: gcc Version: 7.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 g++ trunk at only -O3 on x86_64-linux-gnu in 32- and 64-bit modes. gcc at -O3 works fine. It started with r237064. I am not sure if it is a dup of pr71416 or pr71407. $ 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/7.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 7.0.0 20160608 (experimental) [trunk revision 237212] (GCC) $ gcc-trunk -O3 -c abc.c $ $ g++-trunk -O3 -c abc.c abc.c: In function ‘void fn1()’: abc.c:3:6: internal compiler error: Floating point exception void fn1() { ^~~ 0xd3d9cf crash_signal ../../gcc/gcc/toplev.c:335 0xf833cc vectorizable_live_operation(gimple*, gimple_stmt_iterator*, _slp_tree*, int, gimple**) ../../gcc/gcc/tree-vect-loop.c:6377 0xf7fdb6 vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*, _slp_tree*, _slp_instance*) ../../gcc/gcc/tree-vect-stmts.c:8327 0xf9da2b vect_schedule_slp_instance ../../gcc/gcc/tree-vect-slp.c:3641 0xf9d7f4 vect_schedule_slp_instance ../../gcc/gcc/tree-vect-slp.c:3519 0xf9d7f4 vect_schedule_slp_instance ../../gcc/gcc/tree-vect-slp.c:3519 0xf9e2a6 vect_schedule_slp(vec_info*) ../../gcc/gcc/tree-vect-slp.c:3713 0xf8729d vect_transform_loop(_loop_vec_info*) ../../gcc/gcc/tree-vect-loop.c:6865 0xfa3c85 vectorize_loops() ../../gcc/gcc/tree-vectorizer.c:554 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 int b, c, d; short *e; void fn1() { for (; b; b--) { d = *e >> 2; *e++ = d; c = *e; *e++ = d; } }