https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126700
Bug ID: 126700
Summary: [15/16/17 Regression] ICE at -O2 on aarch64 during RTL
pass: expand
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: xxs_chy at outlook dot com
Target Milestone: ---
Reproducer: https://godbolt.org/z/ed9a54zMe
Reduced case:
#include <stdint.h>
typedef uint32_t v16u32 __attribute__((vector_size(64)));
uint32_t g7;
v16u32 g26;
_Bool f28_c9;
void f28()
{
v16u32 a2;
uint32_t v16;
lbl_entry:
if (g7)
{
g7 = v16;
f28_c9 = 402098599006253881;
}
switch (0)
lbl_sw31:
if (f28_c9) goto lbl_br72;
g26 = 0 >= g26;
goto lbl_sw31;
lbl_br72:
a2 = a2 > g26 < (__attribute__((__vector_size__(16 * sizeof(int))))
int)g26;
v16 = a2[3];
a2 = ~a2;
goto lbl_entry;
}
Dump at -O2:
during RTL pass: expand
<source>: In function 'f28':
<source>:22:8: internal compiler error: in do_store_flag, at expr.cc:14017
22 | a2 = a2 > g26 < (__attribute__((__vector_size__(16 * sizeof(int))))
int)g26;
|
~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/cefs/93/93930cbdc6d69c75235ab933_arm64_gcc-trunk-20260806/aarch64-unknown-linux-gnu/bin/../libexec/gcc/aarch64-unknown-linux-gnu/17.0.0/cc1
-quiet -iprefix
/cefs/93/93930cbdc6d69c75235ab933_arm64_gcc-trunk-20260806/aarch64-unknown-linux-gnu/bin/../lib/gcc/aarch64-unknown-linux-gnu/17.0.0/
-isysroot
/cefs/93/93930cbdc6d69c75235ab933_arm64_gcc-trunk-20260806/aarch64-unknown-linux-gnu/bin/../aarch64-unknown-linux-gnu/sysroot
<source> -quiet -dumpdir /app/ -dumpbase output.c -dumpbase-ext .c
-mlittle-endian -mabi=lp64 -g -O2 -w -fdiagnostics-color=always
-fno-verbose-asm -o /app/output.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1