https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112469
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |acoplan at gcc dot gnu.org
Resolution|FIXED |---
--- Comment #11 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Re-opening as the underlying issue is still present on the 13 branch and shows
up there with the following testcase:
$ cat t.c
_Float16 in[128];
short out[128];
void foo(void) {
for (int i = 0; i < 128; i++) {
_Float16 x = in[i];
_Float16 y = x ? -x : 0.0;
short dst;
__builtin_memcpy (&dst, &y, sizeof(dst));
out[i] = dst;
}
}
$ ./xgcc -B . -c t.c -S -o /dev/null -O2 -march=armv8.2-a+sve
during RTL pass: expand
t.c: In function ‘foo’:
t.c:3:6: internal compiler error: in expand_insn, at optabs.cc:8185
3 | void foo(void) {
| ^~~
0x12b10da expand_insn(insn_code, unsigned int, expand_operand*)
/fast/trunk/src/gcc-worktrees/13/gcc/optabs.cc:8185
0x10c91b7 expand_fn_using_insn
/fast/trunk/src/gcc-worktrees/13/gcc/internal-fn.cc:196
0x10d5e12 expand_direct_optab_fn
/fast/trunk/src/gcc-worktrees/13/gcc/internal-fn.cc:3680
0x10d92f9 expand_COND_NEG
/fast/trunk/src/gcc-worktrees/13/gcc/internal-fn.def:212
0x10dab22 expand_internal_call(internal_fn, gcall*)
/fast/trunk/src/gcc-worktrees/13/gcc/internal-fn.cc:4457
0x10dab51 expand_internal_call(gcall*)
/fast/trunk/src/gcc-worktrees/13/gcc/internal-fn.cc:4465
0xddfb36 expand_call_stmt
/fast/trunk/src/gcc-worktrees/13/gcc/cfgexpand.cc:2763
0xde353a expand_gimple_stmt_1
/fast/trunk/src/gcc-worktrees/13/gcc/cfgexpand.cc:3906
0xde3aa1 expand_gimple_stmt
/fast/trunk/src/gcc-worktrees/13/gcc/cfgexpand.cc:4070
0xdeaec3 expand_gimple_basic_block
/fast/trunk/src/gcc-worktrees/13/gcc/cfgexpand.cc:6132
0xdecd5d execute
/fast/trunk/src/gcc-worktrees/13/gcc/cfgexpand.cc:6867
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.
The same ICE doesn't occur with GCC 14, a bisect shows it is fixed by richi's
r14-5317-g20aa06490ab57da7729a24bae7c4ec2f5918ec91 above. I have prepared a
backport to the 13 branch which I will post to the list shortly.