On Fri, Nov 11, 2022 at 5:03 AM Oria Chen via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > gcc/testsuite ChangeLog: > > 2022-11-11 Oria Chen <oriachi...@gmail.com> > > * gcc/testsuite/gcc.dg/pr25521.c: Add compile option > "-msmall-data-limit=0" to avoid using .srodata section.
I noticed g++.dg/cpp0x/constexpr-rom.C has some slightly different handling here. Seems like there should be a generic way to add -G0/-msmall-data-limit=0 if we don't want small data for a testcase rather than the current scheme of things. Thanks, Andrew Pinski > --- > gcc/testsuite/gcc.dg/pr25521.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.dg/pr25521.c b/gcc/testsuite/gcc.dg/pr25521.c > index 74fe2ae6626..628ddf1a761 100644 > --- a/gcc/testsuite/gcc.dg/pr25521.c > +++ b/gcc/testsuite/gcc.dg/pr25521.c > @@ -2,7 +2,8 @@ > sections. > > { dg-require-effective-target elf } > - { dg-do compile } */ > + { dg-do compile } > + { dg-options "-msmall-data-limit=0" { target { riscv*-*-* } } } */ > > const volatile int foo = 30; > > -- > 2.37.2 >