[Bug target/116308] New: ICE while compiling _Atomic _Float16 for riscv64
pheeck at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 9 07:01:51 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116308
Bug ID: 116308
Summary: ICE while compiling _Atomic _Float16 for riscv64
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: pheeck at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux
Target: riscv64
Compiling this code
testcase.c
```
_Float16 test__Float16_post_inc()
{
_Atomic _Float16 n;
return n++;
}
```
with a riscv64 crosscompiler using -Ofast
riscv64-linux-gnu-gcc testcase.c -Ofast
results in an ICE
during RTL pass: expand
testcase.c: In function ‘test__Float16_post_inc’:
testcase.c:4:12: internal compiler error: Segmentation fault
4 | return ++n;
| ^~
0x27d09ae internal_error(char const*, ...)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/diagnostic-global-context.cc:491
0x1091bdf crash_signal
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/toplev.cc:321
0xcf668d emit_move_insn(rtx_def*, rtx_def*)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/expr.cc:4632
0x140c4c3 riscv_lshift_subword(machine_mode, rtx_def*, rtx_def*, rtx_def**)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/config/riscv/riscv.cc:10966
0x1aac447 gen_zalrsc_atomic_cas_value_stronghi(rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/config/riscv/sync.md:743
0x1aac5ba gen_atomic_compare_and_swaphi(rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/config/riscv/sync.md:673
0xf4dea2 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*>(rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*) const
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/recog.h:441
0xf4dea2 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/optabs.cc:8230
0xf5072b maybe_expand_insn(insn_code, unsigned int, expand_operand*)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/optabs.cc:8258
0xf5072b expand_atomic_compare_and_swap(rtx_def**, rtx_def**, rtx_def*,
rtx_def*, rtx_def*, bool, memmodel, memmodel)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/optabs.cc:7182
0xbbbaf6 expand_builtin_atomic_compare_exchange
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/builtins.cc:6708
0xbc73d9 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/builtins.cc:8636
0xcf2931 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/expr.cc:12376
0xcffca2 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/expr.cc:9466
0xcffca2 expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/expr.h:323
0xcffca2 store_expr(tree_node*, rtx_def*, int, bool, bool)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/expr.cc:6649
0xd013dc expand_assignment(tree_node*, tree_node*, bool)
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/expr.cc:6487
0xbe76aa expand_call_stmt
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/cfgexpand.cc:2893
0xbe76aa expand_gimple_stmt_1
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/cfgexpand.cc:3962
0xbe76aa expand_gimple_stmt
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/gcc/cfgexpand.cc:4104
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.
Compiler configuration:
Using built-in specs.
COLLECT_GCC=/home/worker/cross/bin/riscv64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/worker/cross/libexec/gcc/riscv64-linux-gnu/15.0.0/lto-wrapper
Target: riscv64-linux-gnu
Configured with:
/home/worker/buildworker/tiber-gcc-trunk-riscv64/build/configure
--enable-languages=c,c++,fortran --disable-bootstrap --disable-libsanitizer
--disable-multilib --enable-checking=release --prefix=/home/worker/cross
--target=riscv64-linux-gnu --with-as=/usr/bin/riscv64-suse-linux-as
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20240808 (experimental)
7223c64745530db102a160d5a1db4c2c8d2b9fe1 (GCC)
More information about the Gcc-bugs
mailing list