https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95252
Bug ID: 95252
Summary: testcase gcc.dg/torture/pr67916.c failure when testing
with -msave-restore
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: bina2374 at gmail dot com
CC: kito at gcc dot gnu.org, wilson at gcc dot gnu.org
Target Milestone: ---
Target: riscv64-unknown-elf
FAIL: gcc.dg/torture/pr67916.c -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions execution test
The ABI is lp64d, arch is rv64imafdc, and mcmodel is medany.
The full execution command line is:
<TOOLCHAIN-PATH>/bin/riscv64-unknown-elf-gcc
<GCC-SOURCE-PATH>/gcc/testsuite/gcc.dg/torture/pr67916.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -fdiagnostics-urls=never -msave-restore -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions
-lm -o ./pr67916.exe
Execute with qemu:
$ <QEMU-PATH>/bin/qemu-riscv64./pr67916.exe
Segmentation fault (core dumped)
By the way, I try to reduce the number of compilation options, and found the
smallest combination of options that will cause an execution error:
<TOOLCHAIN-PATH>/bin/riscv64-unknown-elf-gcc
<GCC-SOURCE-PATH>/gcc/testsuite/gcc.dg/torture/pr67916.c -msave-restore -O3
-funroll-loops -lm -o ./pr67916.exe