https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92119
Bug ID: 92119 Summary: [10 Regression] ICE: SIGSEGV in contains_struct_check (tree.h:3380) with -Os -fno-tree-dce -fno-tree-dse -ftree-slp-vectorize Product: gcc Version: 10.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 Created attachment 47046 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47046&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -Os -fno-tree-dce -fno-tree-dse -ftree-slp-vectorize testcase.c -wrapper valgrind,-q,--track-origins=yes ==28823== Invalid read of size 2 ==28823== at 0x1838D81: contains_struct_check (tree.h:3380) ==28823== by 0x1838D81: vect_recog_rotate_pattern(_stmt_vec_info*, tree_node**) (tree-vect-patterns.c:2202) ==28823== by 0x18319C7: vect_pattern_recog_1(vect_recog_func*, _stmt_vec_info*) (tree-vect-patterns.c:5167) ==28823== by 0x183DAEE: vect_pattern_recog(vec_info*) (tree-vect-patterns.c:5323) ==28823== by 0x10D0AA2: vect_slp_analyze_bb_1 (tree-vect-slp.c:2928) ==28823== by 0x10D0AA2: vect_slp_bb(basic_block_def*) (tree-vect-slp.c:3065) ==28823== by 0x10D343F: (anonymous namespace)::pass_slp_vectorize::execute(function*) (tree-vectorizer.c:1310) ==28823== by 0xDB5A7B: execute_one_pass(opt_pass*) (passes.c:2494) ==28823== by 0xDB639F: execute_pass_list_1(opt_pass*) (passes.c:2580) ==28823== by 0xDB63B1: execute_pass_list_1(opt_pass*) (passes.c:2581) ==28823== by 0xDB63B1: execute_pass_list_1(opt_pass*) (passes.c:2581) ==28823== by 0xDB63D8: execute_pass_list(function*, opt_pass*) (passes.c:2591) ==28823== by 0xA93771: cgraph_node::expand() (cgraphunit.c:2194) ==28823== by 0xA944F7: expand_all_functions (cgraphunit.c:2332) ==28823== by 0xA944F7: symbol_table::compile() [clone .part.0] (cgraphunit.c:2688) ==28823== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==28823== during GIMPLE pass: slp testcase.c: In function 'foo': testcase.c:4:1: internal compiler error: Segmentation fault 4 | foo (void) | ^~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-277054-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.0.0/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 --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 --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-277054-checking-yes-rtl-df-extra-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.0 20191016 (experimental) (GCC)