This fires errors like

    FAIL: g++.dg/opt/const7.C  -std=c++14  scan-assembler-symbol-section symbol 
b_var (found _ZL5b_var) has section ^\\.(const|rodata)|\\[RO\\] (found .srodata)

on RISC-V, where RO data can end up in the srodata section.

gcc/testsuite/ChangeLog:

        * g++.dg/opt/const7.C: Allow symbols in .srodata

---

I didn't actually re-run the test suite, as I was poking around with
something else.  This one seems pretty trivial, though.  Happy to do so
before committing, but figured I'd send it out anyway in case anyone
else is triaging our bugs.
---
 gcc/testsuite/g++.dg/opt/const7.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/opt/const7.C 
b/gcc/testsuite/g++.dg/opt/const7.C
index 5bcf94897a8..8bbd9db973f 100644
--- a/gcc/testsuite/g++.dg/opt/const7.C
+++ b/gcc/testsuite/g++.dg/opt/const7.C
@@ -4,4 +4,4 @@
 
 struct B { B()=default; };
 static const B b_var;          //  { dg-bogus "" }
-// { dg-final { scan-assembler-symbol-section {b_var} 
{^\.(const|rodata)|\[RO\]} } }
+// { dg-final { scan-assembler-symbol-section {b_var} 
{^\.(const|rodata|srodata)|\[RO\]} } }
-- 
2.34.1

Reply via email to