https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93247
Bug ID: 93247 Summary: [10 Regression] ICE in get_load_store_type, at tree-vect-stmts.c:2462 since g:ac190fcea1bebf87 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: marxin at gcc dot gnu.org CC: rsandifo at gcc dot gnu.org Target Milestone: --- Starting from the revision I see the following: $ cat vect.i typedef struct { unsigned num; } VEC_tree_base; enum { LTO_DECL_STREAM_NAMESPACE_DECL, LTO_DECL_STREAM_LABEL_DECL, LTO_N_DECL_STREAMS }; struct lto_tree_ref_encoder { VEC_tree_base *trees; } typedef *lto_out_decl_state_ptr; typedef struct { lto_out_decl_state_ptr vec[1]; } VEC_lto_out_decl_state_ptr_base; VEC_lto_out_decl_state_ptr_base *a; int f; long g; int fn1(struct lto_tree_ref_encoder *p1) { int i; long b; i = 0; for (; i < LTO_N_DECL_STREAMS; i++) { struct lto_tree_ref_encoder c = *p1; int d; VEC_tree_base *e = c.trees; d = e ? e->num : 0; b += d; } return b; } int fn2() { lto_out_decl_state_ptr h; struct lto_tree_ref_encoder j; unsigned k; for (; k < f; k++) { h = a->vec[k]; j = *h; g += fn1(&j); } } $ gcc vect.i -O3 -march=skylake during GIMPLE pass: vect vect.i: In function ‘fn2’: vect.i:37:1: internal compiler error: in get_load_store_type, at tree-vect-stmts.c:2462 37 | fn2() { | ^~~ 0x732231 get_load_store_type /home/marxin/Programming/gcc/gcc/tree-vect-stmts.c:2462 0x104a5d5 vectorizable_load /home/marxin/Programming/gcc/gcc/tree-vect-stmts.c:8708 0x105ba2e vect_transform_stmt(_stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*) /home/marxin/Programming/gcc/gcc/tree-vect-stmts.c:10989 0x105e94e vect_transform_loop_stmt /home/marxin/Programming/gcc/gcc/tree-vect-loop.c:8299 0x1075874 vect_transform_loop(_loop_vec_info*) /home/marxin/Programming/gcc/gcc/tree-vect-loop.c:8690 0x1091e2e try_vectorize_loop_1 /home/marxin/Programming/gcc/gcc/tree-vectorizer.c:989 0x1091f42 try_vectorize_loop_1 /home/marxin/Programming/gcc/gcc/tree-vectorizer.c:1026 0x1092989 vectorize_loops() /home/marxin/Programming/gcc/gcc/tree-vectorizer.c:1125 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.