https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95272
Bug ID: 95272 Summary: ice in vectorizable_reduction, at tree-vect-loop.c:6197 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C++ code: enum { a = 5, b }; typedef struct { int c[b]; } d; extern d e[]; int f; int g[6]; void h() { int i; for (; f; f++) { i = 0; for (; i < b; i++) if (e[f].c[i]) g[i] = e[f].c[i]; } } compiled by recent gcc trunk and compiler flags -w -c -O3 -march=cooperlake, I get: during GIMPLE pass: vect bug613.cc: In function ‘void h()’: bug613.cc:8:6: internal compiler error: in vectorizable_reduction, at tree-vect- loop.c:6197 8 | void h() { | ^ 0x11e91f5 vectorizable_reduction(_loop_vec_info*, _stmt_vec_info*, _slp_tree*, _ slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) ../../trunk.git/gcc/tree-vect-loop.c:6197 0x11bb55d vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*, _slp_ instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) ../../trunk.git/gcc/tree-vect-stmts.c:11067 0x120767d vect_slp_analyze_node_operations_1(vec_info*, _slp_tree*, _slp_instanc e*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) ../../trunk.git/gcc/tree-vect-slp.c:2676 0x120767d vect_slp_analyze_node_operations(vec_info*, _slp_tree*, _slp_instance* , hash_set<_slp_tree*, false, default_hash_traits<_slp_tree*> >&, hash_set<_slp_ tree*, false, default_hash_traits<_slp_tree*> >&, vec<stmt_info_for_cost, va_hea p, vl_ptr>*) ../../trunk.git/gcc/tree-vect-slp.c:2844 The problem first seems to occur sometime between dates 20200521 and 20200522. git hashes f094665d465..e740f3d7314