https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119166
Bug ID: 119166 Summary: ICE: SIGSEGV in get_load_store_type (tree-vect-stmts.cc:2711) with -O2 --param=vect-force-slp=0 Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 60681 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60681&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O2 --param=vect-force-slp=0 testcase.c -wrapper valgrind,-q ==1120== Invalid read of size 8 ==1120== at 0x1956DD9: get_load_store_type(vec_info*, _stmt_vec_info*, tree_node*, _slp_tree*, bool, vec_load_store_type, unsigned int, vect_memory_access_type*, poly_int<1u, long>*, dr_alignment_support*, int*, gather_scatter_info*, internal_fn*, vec<int, va_heap, vl_ptr>*) (tree-vect-stmts.cc:2711) ==1120== by 0x196F033: vectorizable_load(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, gimple**, _slp_tree*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) (tree-vect-stmts.cc:10458) ==1120== by 0x197E8EA: vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*, _slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) (tree-vect-stmts.cc:14003) ==1120== by 0x19A8858: vect_analyze_loop_operations (tree-vect-loop.cc:2241) ==1120== by 0x19A8858: vect_analyze_loop_2(_loop_vec_info*, bool&, unsigned int*, unsigned int&) (tree-vect-loop.cc:3007) ==1120== by 0x19AA581: vect_analyze_loop_1(loop*, vec_info_shared*, vect_loop_form_info const*, _loop_vec_info*, vec<machine_mode, va_heap, vl_ptr> const&, unsigned int&, machine_mode&, bool&) (tree-vect-loop.cc:3482) ==1120== by 0x19AAE13: vect_analyze_loop(loop*, gimple*, vec_info_shared*) (tree-vect-loop.cc:3642) ==1120== by 0x19F8B78: try_vectorize_loop_1 (tree-vectorizer.cc:1095) ==1120== by 0x19F8B78: try_vectorize_loop(hash_table<simduid_to_vf, false, xcallocator>*&, unsigned int*, loop*, function*) (tree-vectorizer.cc:1214) ==1120== by 0x19F9384: (anonymous namespace)::pass_vectorize::execute(function*) (tree-vectorizer.cc:1330) ==1120== by 0x153C8A7: execute_one_pass(opt_pass*) (passes.cc:2659) ==1120== by 0x153D14F: execute_pass_list_1(opt_pass*) (passes.cc:2768) ==1120== by 0x153D161: execute_pass_list_1(opt_pass*) (passes.cc:2769) ==1120== by 0x153D161: execute_pass_list_1(opt_pass*) (passes.cc:2769) ==1120== Address 0x20 is not stack'd, malloc'd or (recently) free'd ==1120== during GIMPLE pass: vect testcase.c: In function 'foo': testcase.c:4:1: internal compiler error: Segmentation fault 4 | foo() | ^~~ 0x2df4221 internal_error(char const*, ...) /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517 0x16916ef crash_signal /repo/gcc-trunk/gcc/toplev.cc:322 0x1956dd9 get_load_store_type /repo/gcc-trunk/gcc/tree-vect-stmts.cc:2711 ... $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20250307135039-r15-7886-g2427793af1e545-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/15.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-20250307135039-r15-7886-g2427793af1e545-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.1 20250307 (experimental) (GCC)