On 10/2/25 12:15 PM, Raphael Moreira Zinsly wrote:
frame.total_size may not be a constant, this patch changes the type of
the stored cfa offset to avoid errors trying to convert the frame size.
PR target/122114
gcc/ChangeLog:
* config/riscv/riscv.cc
(riscv_allocate_and_probe_stack_space): Change initial_cfa_offset
type.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/pr122114.c: New test.
Unfortunately the new test is failing according to the pre-commit tester:
https://github.com/ewlu/gcc-precommit-ci/issues/3968#issuecomment-3362520332
diff --git a/gcc/testsuite/gcc.target/riscv/pr122114.c
b/gcc/testsuite/gcc.target/riscv/pr122114.c
new file mode 100644
index 00000000000..d7c195f8ad4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr122114.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fstack-clash-protection -march=rv64gcv_zvl256b" } */
I wouldn't be surprised if the failure is a need for -mabi in the
options. You may also want to restrict the test to { target rv64 } on
the dg-do line.
jeff