https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128700
Bug ID: 128700
Summary: ICE in as_a, at machmode.h:391 at -O2 passing one
value to unsigned and signed _BitInt(113) parameters
(-m32, arm)
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: shimizu2486 at gmail dot com
Target Milestone: ---
Target: i686-linux-gnu, arm-linux-gnueabihf
Live reproducer: https://godbolt.org/z/bfd6s5MMr
$ cat t1.c
void f(unsigned _BitInt(113));
void g(_BitInt(113));
void h(signed char x) {
unsigned long long v = x;
f(v);
g(v);
}
$ gcc -m32 -O2 -c t1.c
during RTL pass: expand
t1.c: In function 'h':
t1.c:6:3: internal compiler error: in as_a, at machmode.h:391
6 | g(v);
| ^~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
x86_64 trunk (a2a11abf) -m32 ICE
x86_64 16.2.0 -m32 ICE
x86_64 15.3.0 -m32 ICE
x86_64 14.4.0 -m32 ICE (in as_a, at machmode.h:381)
arm trunk (a2a11abf) ICE
arm 16.2.0 ICE
-O2, -O3 and -Os ICE; -O0 and -O1 compile. x86_64 without -m32, and riscv64
compile it.
Any width above 64 for both parameters ICEs (65, 96, 128); with _BitInt(64), or
with only the call to f, it compiles.