]> gcc.gnu.org Git - gcc.git/commit
c++: Fix g++.dg/ext/attr-section2.C etc. with Solaris/SPARC as
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 1 Feb 2024 11:46:20 +0000 (12:46 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 1 Feb 2024 11:46:20 +0000 (12:46 +0100)
commite98edc6a3cdfcdad71a2f7be5818033ea15cdde7
tree3257cfac8b9043330164539c9fab8cdfbec552c1
parentdd3455f69577eed9d65e7e00161666fcfbbf444c
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.
gcc/testsuite/g++.dg/ext/attr-section2.C
gcc/testsuite/g++.dg/ext/attr-section2a.C
gcc/testsuite/g++.dg/ext/attr-section2b.C
This page took 0.063539 seconds and 6 git commands to generate.