https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117484
Bug ID: 117484 Summary: [15 Regression] ICE: segfault during GIMPLE pass: vect Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Testcase: extern int a; extern short b[]; extern signed char c[], d[]; int main() { for (long j = 3; j; j += 3) if (c[j] ? b[j] : 0) { b[j] = d[j - 2]; a = d[j]; } } Command/backtrace: > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/riscv64-unknown-linux-gnu-gcc > -fsigned-char -fno-strict-aliasing -fwrapv -march=rv64gcv -fwhole-program > -O3 red.c -o rv64gcv.out during GIMPLE pass: vect red.c: In function 'main': red.c:4:5: internal compiler error: Segmentation fault 4 | int main() { | ^~~~ 0x2f0de35 internal_error(char const*, ...) ../../../gcc/gcc/diagnostic-global-context.cc:518 0x13b0163 crash_signal ../../../gcc/gcc/toplev.cc:323 0x7c71c764251f ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0xf8bf81 location_wrapper_p(tree_node const*) ../../../gcc/gcc/tree.h:4410 0xf8bf81 tree_strip_any_location_wrapper(tree_node*) ../../../gcc/gcc/tree.h:4422 0xf8bf81 operand_compare::operand_equal_p(tree_node const*, tree_node const*, unsigned int) ../../../gcc/gcc/fold-const.cc:3177 0xf8f640 operand_compare::operand_equal_p(tree_node const*, tree_node const*, unsigned int) ../../../gcc/gcc/fold-const.cc:4244 0xf8f640 operand_compare::verify_hash_value(tree_node const*, tree_node const*, unsigned int, bool*) ../../../gcc/gcc/fold-const.cc:4233 0xf8f640 operand_compare::verify_hash_value(tree_node const*, tree_node const*, unsigned int, bool*) ../../../gcc/gcc/fold-const.cc:4225 0xf901ec operand_compare::operand_equal_p(tree_node const*, tree_node const*, unsigned int) ../../../gcc/gcc/fold-const.cc:3173 0xf901ec operand_equal_p(tree_node const*, tree_node const*, unsigned int) ../../../gcc/gcc/fold-const.cc:4264 0x16e22d0 vect_build_slp_tree_2 ../../../gcc/gcc/tree-vect-slp.cc:2678 0x16e55eb vect_build_slp_tree ../../../gcc/gcc/tree-vect-slp.cc:1806 0x16dff17 vect_build_slp_tree_2 ../../../gcc/gcc/tree-vect-slp.cc:2743 0x16e55eb vect_build_slp_tree ../../../gcc/gcc/tree-vect-slp.cc:1806 0x16dff17 vect_build_slp_tree_2 ../../../gcc/gcc/tree-vect-slp.cc:2743 0x16e55eb vect_build_slp_tree ../../../gcc/gcc/tree-vect-slp.cc:1806 0x16e0be8 vect_build_slp_tree_2 ../../../gcc/gcc/tree-vect-slp.cc:2077 0x16e55eb vect_build_slp_tree ../../../gcc/gcc/tree-vect-slp.cc:1806 0x16dff17 vect_build_slp_tree_2 ../../../gcc/gcc/tree-vect-slp.cc:2743 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Godbolt: https://godbolt.org/z/nfovE9jr1