https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95308
Bug ID: 95308 Summary: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vsevolod.livinskij at frtk dot ru Target Milestone: --- Error: >$ g++ -O3 -march=skylake-avx512 -c func.cpp during GIMPLE pass: forwprop func.cpp: In function ‘void i(char, long int (*)[100][100][100])’: func.cpp:5:6: internal compiler error: in maybe_canonicalize_mem_ref_addr, at gimple-fold.c:4912 5 | void i(char f, long g[][100][100][100]) { | ^ 0x76db2a maybe_canonicalize_mem_ref_addr gcc_src/gcc/gimple-fold.c:4912 0xdfdd97 fold_stmt_1 gcc_src/gcc/gimple-fold.c:5014 0x1226b41 execute gcc_src/gcc/tree-ssa-forwprop.c:3095 Reproducer: extern int a[][18]; extern short b[], c[]; extern char d[][18]; int e; void i(char f, long g[][100][100][100]) { for (int h = 0;; h += 2) for (char j = 0; j < 17; j++) { if (e ? f : 0) { a[h][j] = 5; for (int k = 0; k < 12; k += 4) for (short l = 0; l < 015; l += 2) b[k * 3 + l] = bool(g[2][j][k][l]); } else d[h][j] = 0; c[j] = 3; } } GCC version: 11.0.0 (a57aa11191617754c8d43b3eb6a2576e970a0668)