https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123742
Bug ID: 123742
Summary: [ARM] ice with _Float16 and -Ofast
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For this reduced C source code:
void printf(char *);
_Float16 main_in[0];
void main() {
_Float16 out;
for (int i = 0; i < 100; i++)
if (out < main_in[i])
out = main_in[i];
if (out)
printf("");
}
on a Raspberry PI 5, does this:
dcb@raspberrypi:~/cvise $ ~/gcc/results/bin/gcc -c -w -O3 bug1172.c
dcb@raspberrypi:~/cvise $ ~/gcc/results/bin/gcc -c -w -Ofast bug1172.c
bug1172.c: In function ‘main’:
bug1172.c:10:1: error: unrecognizable insn:
10 | }
| ^
(insn 9 8 10 2 (set (reg:V8HF 140 [ _2 ])
(smax:V8HF (reg:V8HF 143)
(reg:V8HF 144))) -1
(nil))
during RTL pass: vregs
bug1172.c:10:1: internal compiler error: in extract_insn, at recog.cc:2888
0x1c5383f internal_error(char const*, ...)
../../trunk/gcc/diagnostic-global-context.cc:787
0x2abba7 fancy_abort(char const*, int, char const*)
../../trunk/gcc/diagnostics/context.cc:1805
0x293c0f _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../trunk/gcc/rtl-error.cc:108
0x293c4b _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../trunk/gcc/rtl-error.cc:116
0xa88243 extract_insn(rtx_insn*)
../../trunk/gcc/recog.cc:2888
Compiler is
dcb@raspberrypi:~/cvise $ ~/gcc/results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.20260119.ubsan/libexec/gcc/arm-linux-gnueabihf/16.0.1/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../trunk/configure
--prefix=/home/dcb/gcc/results.20260119.ubsan --disable-bootstrap --disable-doc
--disable-multilib --with-build-config=bootstrap-ubsan
--with-pkgversion=30cfa1c174648154 --enable-checking=yes
--enable-languages=c,c++ --with-cpu=cortex-a76 --with-fpu=neon-fp-armv8
--with-float=hard --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.1 20260119 (experimental) (30cfa1c174648154)
dcb@raspberrypi:~/cvise $
The earliest compiler I have which shows the fault has a git hash of
g:c65fdb6b03d9146e, dated 20251221.