https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108816
Bug ID: 108816 Summary: ICE in operator[], at vec.h:889 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: aarch64-linux-gnu gcc 13.0.1 20230212 snapshot (g:06ca0c9abb260266b688e2c2154c72214bb47076) ICEs when compiling the following testcase w/ -mcpu=cortex-x3 -O2 -fvect-cost-model=dynamic: int m; void foo (int p[][16], unsigned int x) { while (x < 4) { int j; for (j = x * 4; j < (x + 1) * 4 - 2; j++) p[0][j] = p[m][j]; ++x; } } % aarch64-linux-gnu-gcc-13 -mcpu=cortex-x3 -O2 -fvect-cost-model=dynamic -c ck0pb2mc.c during GIMPLE pass: vect ck0pb2mc.c: In function 'foo': ck0pb2mc.c:4:1: internal compiler error: in operator[], at vec.h:889 4 | foo (int p[][16], unsigned int x) | ^~~ 0x77eef2 vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int) /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/vec.h:889 0x77eef8 vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int) /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-cfg.cc:9409 0x77eef8 extract_true_false_edges_from_block(basic_block_def*, edge_def**, edge_def**) /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-cfg.cc:9410 0x11e6cdb vect_loop_versioning(_loop_vec_info*, gimple*) /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vect-loop-manip.cc:3724 0x11da221 vect_transform_loop(_loop_vec_info*, gimple*) /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vect-loop.cc:10767 0x121f2cf vect_transform_loops /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1007 0x121f94c try_vectorize_loop_1 /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1153 0x121f94c try_vectorize_loop /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1183 0x121fcf4 execute /var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1299