On Thu, 12 May 2022 18:55:45 PDT (-0700), jia...@iscas.ac.cn wrote:
Similar to patch 593993, RISC-V needs to limit symbols send in sdata.
Thanks for Palmer's help.
gcc/testsuite/ChangeLog:
* g++.dg/opt/const7.C: Don't use small data on RISC-V.
---
gcc/testsuite/g++.dg/opt/const7.C | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/g++.dg/opt/const7.C
b/gcc/testsuite/g++.dg/opt/const7.C
index 5bcf94897a8..50d902beae1 100644
--- a/gcc/testsuite/g++.dg/opt/const7.C
+++ b/gcc/testsuite/g++.dg/opt/const7.C
@@ -1,6 +1,7 @@
// PR c++/104142
// { dg-do compile { target c++11 } }
// { dg-additional-options -Wunused-variable }
+// { dg-options "-msmall-data-limit=0" { target { riscv*-*-* } } }
struct B { B()=default; };
static const B b_var; // { dg-bogus "" }
Thanks, I committed this as it's just a RISC-V option. Looks like your
author-name field is just set to your username in git, I fixed it up
based on some older commits (though I missed that last time, sorry).
Might be worth putting together some sort of DG support for these,
there's a handful of ports that have sdata-flavored sections and we're
all chasing around these test failures.