https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103816
Bug ID: 103816 Summary: ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1748 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: k.even-mendoza at imperial dot ac.uk Target Milestone: --- This program crashed with GCC-12 with -O2 and -O3: typedef enum { e } f; struct { f __attribute__((mode(__byte__))) a; f __attribute__((mode(__byte__))) b; f __attribute__((mode(__byte__))) c; f __attribute__((mode(__byte__))) d } g[]; void main() { g[0].b = (g[0].b & g[4].b) * g[2305843009213693952].c; } This code works fine with GCC-11. I tried several versions of GCC-12: 20211023, 20211118, and 20211216 on Ubuntu-18. The trace looks like this: === fuzzer-file-54092.c:7:1: warning: no semicolon at end of struct or union 7 | } g[]; | ^ fuzzer-file-54092.c:7:3: warning: array ‘g’ assumed to have one element 7 | } g[]; | ^ during GIMPLE pass: slp fuzzer-file-54092.c: In function ‘main’: fuzzer-file-54092.c:8:6: internal compiler error: in vect_build_slp_tree_2, at tree-vect-slp.c:1748 8 | void main() { g[0].b = (g[0].b & g[4].b) * g[2305843009213693952].c; } | ^~~~ 0x7d2c1c vect_build_slp_tree_2 .././../gcc-source/gcc/tree-vect-slp.c:1748 0x119b89d vect_build_slp_tree .././../gcc-source/gcc/tree-vect-slp.c:1549 0x119fe30 vect_build_slp_instance .././../gcc-source/gcc/tree-vect-slp.c:3025 0x11a5966 vect_analyze_slp(vec_info*, unsigned int) .././../gcc-source/gcc/tree-vect-slp.c:3388 0x11aa0ea vect_slp_analyze_bb_1 .././../gcc-source/gcc/tree-vect-slp.c:5762 0x11aa0ea vect_slp_region .././../gcc-source/gcc/tree-vect-slp.c:5864 0x11aa0ea vect_slp_bbs .././../gcc-source/gcc/tree-vect-slp.c:6056 0x11ac131 vect_slp_function(function*) .././../gcc-source/gcc/tree-vect-slp.c:6144 0x11b36e2 execute .././../gcc-source/gcc/tree-vectorizer.c:1503 Please submit a full bug report,