public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8689] c++: Fix g++.dg/ext/attr-section2.C etc. with Solaris/SPARC as
@ 2024-02-01 11:46 Rainer Orth
  0 siblings, 0 replies; only message in thread
From: Rainer Orth @ 2024-02-01 11:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e98edc6a3cdfcdad71a2f7be5818033ea15cdde7

commit r14-8689-ge98edc6a3cdfcdad71a2f7be5818033ea15cdde7
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date:   Thu Feb 1 12:46:20 2024 +0100

    c++: Fix g++.dg/ext/attr-section2.C etc. with Solaris/SPARC as
    
    The new g++.dg/ext/attr-section2*.C tests FAIL on Solaris/SPARC with the
    native assembler:
    
    +FAIL: g++.dg/ext/attr-section2.C -std=c++14 scan-assembler
    .(section|csect)[ \\\\t]+.foo
    +FAIL: g++.dg/ext/attr-section2.C -std=c++17 scan-assembler
    .(section|csect)[ \\\\t]+.foo
    +FAIL: g++.dg/ext/attr-section2.C -std=c++20 scan-assembler
    .(section|csect)[ \\\\t]+.foo
    
    The problem is that the SPARC assembler requires the section name to be
    double-quoted, like
    
            .section        ".foo%_Z3varIiE",#alloc,#write,#progbits
    
    This patch allows for that.  At the same time, it quotes literal dots in
    the REs.
    
    Tested on sparc-sun-solaris2.11 (as and gas) and i386-pc-solaris2.11 (as
    and gas).
    
    2024-01-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
    
            gcc/testsuite:
            * g++.dg/ext/attr-section2.C (scan-assembler): Quote dots.  Allow
            for double-quoted section name.
            * g++.dg/ext/attr-section2a.C: Likewise.
            * g++.dg/ext/attr-section2b.C: Likewise.

Diff:
---
 gcc/testsuite/g++.dg/ext/attr-section2.C  | 2 +-
 gcc/testsuite/g++.dg/ext/attr-section2a.C | 2 +-
 gcc/testsuite/g++.dg/ext/attr-section2b.C | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/g++.dg/ext/attr-section2.C b/gcc/testsuite/g++.dg/ext/attr-section2.C
index 7c9221b73aa5..81567c10b774 100644
--- a/gcc/testsuite/g++.dg/ext/attr-section2.C
+++ b/gcc/testsuite/g++.dg/ext/attr-section2.C
@@ -6,4 +6,4 @@ template<class T>
 
 template int var<int>;
 
-// { dg-final { scan-assembler {.(section|csect)[ \t]+.foo} } }
+// { dg-final { scan-assembler {\.(section|csect)[ \t]+"?\.foo} } }
diff --git a/gcc/testsuite/g++.dg/ext/attr-section2a.C b/gcc/testsuite/g++.dg/ext/attr-section2a.C
index 4fa898c54edd..97b3a10a178c 100644
--- a/gcc/testsuite/g++.dg/ext/attr-section2a.C
+++ b/gcc/testsuite/g++.dg/ext/attr-section2a.C
@@ -11,4 +11,4 @@ int A<T>::var = 42;
 
 template struct A<int>;
 
-// { dg-final { scan-assembler {.(section|csect)[ \t]+.foo} } }
+// { dg-final { scan-assembler {\.(section|csect)[ \t]+"?\.foo} } }
diff --git a/gcc/testsuite/g++.dg/ext/attr-section2b.C b/gcc/testsuite/g++.dg/ext/attr-section2b.C
index 93987733ff2f..bef0377016d1 100644
--- a/gcc/testsuite/g++.dg/ext/attr-section2b.C
+++ b/gcc/testsuite/g++.dg/ext/attr-section2b.C
@@ -9,4 +9,4 @@ int* fun() {
 
 template int* fun<int>();
 
-// { dg-final { scan-assembler {.(section|csect)[ \t]+.foo} } }
+// { dg-final { scan-assembler {\.(section|csect)[ \t]+"?\.foo} } }

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

only message in thread, other threads:[~2024-02-01 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 11:46 [gcc r14-8689] c++: Fix g++.dg/ext/attr-section2.C etc. with Solaris/SPARC as Rainer Orth

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).