https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95653
Bug ID: 95653 Summary: [11 Regression] ICE: SIGSEGV in gimple_bb (gimple.h:1847) with -ftree-loop-vectorize -fno-tree-scev-cprop Product: gcc Version: 11.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 48722 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48722&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O2 -ftree-loop-vectorize -fno-tree-scev-cprop testcase.c -wrapper valgrind,-q ==6104== Invalid read of size 8 ==6104== at 0x1AD8111: gimple_bb (gimple.h:1847) ==6104== by 0x1AD8111: loop_containing_stmt (tree-ssa-loop.h:76) ==6104== by 0x1AD8111: chrec_contains_symbols_defined_in_loop(tree_node const*, unsigned int, hash_set<tree_node const*, false, default_hash_traits<tree_node const*> >&) (tree-chrec.c:1009) ==6104== by 0x1AD81F9: chrec_contains_symbols_defined_in_loop(tree_node const*, unsigned int, hash_set<tree_node const*, false, default_hash_traits<tree_node const*> >&) (tree-chrec.c:1026) ==6104== by 0x1AD81F9: chrec_contains_symbols_defined_in_loop(tree_node const*, unsigned int, hash_set<tree_node const*, false, default_hash_traits<tree_node const*> >&) (tree-chrec.c:1026) ==6104== by 0x1AD81F9: chrec_contains_symbols_defined_in_loop(tree_node const*, unsigned int, hash_set<tree_node const*, false, default_hash_traits<tree_node const*> >&) (tree-chrec.c:1026) ==6104== by 0x1AD82B5: chrec_contains_symbols_defined_in_loop(tree_node const*, unsigned int) (tree-chrec.c:1039) ==6104== by 0x10D09E7: compute_overall_effect_of_inner_loop (tree-scalar-evolution.c:473) ==6104== by 0x10D09E7: compute_overall_effect_of_inner_loop(loop*, tree_node*) (tree-scalar-evolution.c:447) ==6104== by 0x10D0F6E: follow_ssa_edge_inner_loop_phi (tree-scalar-evolution.c:1114) ==6104== by 0x10D0F6E: follow_ssa_edge_expr(loop*, gimple*, tree_node*, gphi*, tree_node**, int) (tree-scalar-evolution.c:1183) ==6104== by 0x10D108E: follow_ssa_edge_in_condition_phi_branch (tree-scalar-evolution.c:1011) ==6104== by 0x10D108E: follow_ssa_edge_in_condition_phi (tree-scalar-evolution.c:1037) ==6104== by 0x10D108E: follow_ssa_edge_expr(loop*, gimple*, tree_node*, gphi*, tree_node**, int) (tree-scalar-evolution.c:1165) ==6104== by 0x10D108E: follow_ssa_edge_in_condition_phi_branch (tree-scalar-evolution.c:1011) ==6104== by 0x10D108E: follow_ssa_edge_in_condition_phi (tree-scalar-evolution.c:1037) ==6104== by 0x10D108E: follow_ssa_edge_expr(loop*, gimple*, tree_node*, gphi*, tree_node**, int) (tree-scalar-evolution.c:1165) ==6104== by 0x10CEF49: analyze_evolution_in_loop (tree-scalar-evolution.c:1396) ==6104== by 0x10CEF49: interpret_loop_phi (tree-scalar-evolution.c:1560) ==6104== by 0x10CEF49: analyze_scalar_evolution_1(loop*, tree_node*) (tree-scalar-evolution.c:1974) ==6104== by 0x10CF79A: analyze_scalar_evolution(loop*, tree_node*) (tree-scalar-evolution.c:2038) ==6104== by 0x1AE20E6: get_base_for_alignment_1 (tree-data-ref.c:5738) ==6104== by 0x1AE20E6: get_base_for_alignment(tree_node*, unsigned int*) (tree-data-ref.c:5792) ==6104== Address 0x10 is not stack'd, malloc'd or (recently) free'd ==6104== during GIMPLE pass: vect testcase.c: In function 'g': testcase.c:6:1: internal compiler error: Segmentation fault 6 | g (char *h) | ^ 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/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r11-1248-20200612093253-g47fe96341d2-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/11.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-r11-1248-20200612093253-g47fe96341d2-checking-yes-rtl-df-extra-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.0.0 20200612 (experimental) (GCC)