https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69053
Bug ID: 69053 Summary: [6 Regression] ICE in build_vector_from_val Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: miyuki at gcc dot gnu.org CC: alan.lawrence at arm dot com Target Milestone: --- Target: x86_64-*-* Starting with r230423 the following testcase causes an ICE: $ cat genattrtab.cc struct A { int *elem[1]; }; int a, d, e; A *b; int *c; int main() { int *f = 0; for (; e; e++) if (b->elem[e]) f = c; if (f) a = d; } $ cc1plus -march=core-avx2 -quiet -O3 genattrtab.cc genattrtab.cc: In function 'int main()': genattrtab.cc:7:5: internal compiler error: in build_vector_from_val, at tree.c:1754 int main() ^~~~ 0xf62595 build_vector_from_val(tree_node*, tree_node*) /home/miyuki/gcc/src/gcc/tree.c:1753 0xf0c94a get_initial_def_for_reduction(gimple*, tree_node*, tree_node**) /home/miyuki/gcc/src/gcc/tree-vect-loop.c:4120 0x5b809a vect_create_epilog_for_reduction /home/miyuki/gcc/src/gcc/tree-vect-loop.c:4283 0xf0e65d vectorizable_reduction(gimple*, gimple_stmt_iterator*, gimple**, _slp_tree*) /home/miyuki/gcc/src/gcc/tree-vect-loop.c:6100 0xf05e30 vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*, _slp_tree*, _slp_instance*) /home/miyuki/gcc/src/gcc/tree-vect-stmts.c:8048 0xf0be72 vect_transform_loop(_loop_vec_info*) /home/miyuki/gcc/src/gcc/tree-vect-loop.c:6793 0xf27537 vectorize_loops() /home/miyuki/gcc/src/gcc/tree-vectorizer.c:548 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.