https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96755
Bug ID: 96755 Summary: ICE in final_scan_insn_1, at final.c:3073 with -O3 -march=skylake-avx512 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vsevolod.livinskij at frtk dot ru Target Milestone: --- >$ g++ -O3 -march=skylake-avx512 -c func.cpp func.cpp: In function ‘void test(short unsigned int, unsigned char, long long int)’: func.cpp:13:1: error: could not split insn 13 | } | ^ (insn 644 21 817 50 (set (reg:DI 70 k2 [orig:83 D.4406 ] [83]) (zero_extend:DI (not:SI (reg:SI 70 k2 [orig:505 b ] [505])))) "func.cpp":10:18 622 {*one_cmplsi2_1_zext} (nil)) during RTL pass: final func.cpp:13:1: internal compiler error: in final_scan_insn_1, at final.c:3073 0x7cf5e7 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /gcc/rtl-error.c:108 0x75b978 final_scan_insn_1 /gcc/final.c:3073 0xd9b5cf final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) /gcc/final.c:3152 0xd9b8c7 final_1 /gcc/final.c:2020 0xd9c298 rest_of_handle_final /gcc/final.c:4658 0xd9c298 execute /gcc/final.c:4736 Reproducer: extern long var_22; extern int arr_3[]; extern int arr_4[][20][9]; short a; void test(unsigned short b, unsigned char e, long long g) { for (long c = 0; c < 20ULL; c = g) for (short d = 0; d < 9; d++) for (char f = e; f < 8; f += 4) { arr_3[f] = 0; var_22 = ~(unsigned)b; arr_4[c][d][f] = a; } } gcc version 11.0.0 20200823 (87c753ac241f25d222d46ba1ac66ceba89d6a200)