public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] c++: Add srodata to the allowed sections
@ 2022-04-21  2:16 Palmer Dabbelt
  0 siblings, 0 replies; only message in thread
From: Palmer Dabbelt @ 2022-04-21  2:16 UTC (permalink / raw)
  To: gcc-patches

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-21  2:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  2:16 [PATCH] c++: Add srodata to the allowed sections Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).