[gcc r17-2650] testsuite: Use solaris_as effective target
Rainer Orth via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:52de3042c9893da3c343e2a61c77b5a79b656603 commit r17-2650-g52de3042c9893da3c343e2a61c77b5a79b656603 Author: Rainer Orth <[email protected]> Date: Thu Jul 23 10:02:10 2026 +0200 testsuite: Use solaris_as effective target Several uses of the gas effective target in the testsuite are actually about if Solaris as is in use. This patch uses the new framework to generate effective targets from auto-host.h to introduce a solaris_as effective target and adjusts affected tests accordingly. The existing gas effective target remains, however, because other uses are about using gas features in particular. Bootstrapped without regressions on i386-pc-solaris2.11, sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and sparc64-unknown-linux-gnu. 2026-05-10 Rainer Orth <[email protected]> gcc/testsuite: * lib/et-static.def (solaris_as): New effective target. * g++.dg/abi/lambda-static-1.C: Check solaris_as instead of !gas. * g++.dg/debug/dwarf2/nested-4.C: Likewise. * g++.dg/eh/pr119507.C: Likewise. * gcc.c-torture/compile/pr61159.c: Likewise. * gcc.dg/attr-weakref-1.c: Likewise. * gcc.dg/tree-ssa/cswtch-6.c: Likewise. * gcc.dg/tree-ssa/cswtch-7.c: Likewise. * gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c: Likewise. * gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c: Likewise. * gcc.target/i386/pr91298-1.c: Likewise. * gcc.target/i386/pr91298-2.c: Likewise. * lib/target-supports.exp (check_effective_target_avx512dq): Likewise. (check_effective_target_avx512bw): Likewise. gcc: * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes): Document solaris_as. Diff: --- gcc/doc/sourcebuild.texi | 3 +++ gcc/testsuite/g++.dg/abi/lambda-static-1.C | 4 ++-- gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C | 2 +- gcc/testsuite/g++.dg/eh/pr119507.C | 2 +- gcc/testsuite/gcc.c-torture/compile/pr61159.c | 2 +- gcc/testsuite/gcc.dg/attr-weakref-1.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/cswtch-6.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c | 2 +- gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c | 2 +- gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c | 2 +- gcc/testsuite/gcc.target/i386/pr91298-1.c | 2 +- gcc/testsuite/gcc.target/i386/pr91298-2.c | 2 +- gcc/testsuite/lib/et-static.def | 4 ++++ gcc/testsuite/lib/target-supports.exp | 4 ++-- 14 files changed, 21 insertions(+), 14 deletions(-) diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index e53c0b372103..1f58ff07f697 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -3211,6 +3211,9 @@ Target supports section anchors. @item short_enums Target defaults to short enums. +@item solaris_as +Target uses the Solaris @command{as}. + @item stack_size @anchor{stack_size_et} Target has limited stack size. The stack size limit can be obtained using the diff --git a/gcc/testsuite/g++.dg/abi/lambda-static-1.C b/gcc/testsuite/g++.dg/abi/lambda-static-1.C index 6299733fe211..e410e30413c7 100644 --- a/gcc/testsuite/g++.dg/abi/lambda-static-1.C +++ b/gcc/testsuite/g++.dg/abi/lambda-static-1.C @@ -23,5 +23,5 @@ void indirect () // { dg-final { scan-assembler ".section\[\t ]*.text._ZZ5lambyvENKUlvE_clEv,\[^\n\r]*,_ZZ5lambyvENKUlvE_clEv,comdat" { target { { ! *-*-solaris2.* } || { gas } } } } } // { dg-final { scan-assembler ".section\[\t ]*.text._ZZ5lambyvENUlvE_4_FUNEv,\[^\n\r]*,_ZZ5lambyvENUlvE_4_FUNEv,comdat" { target { { ! *-*-solaris2.* } || { gas } } } } } -// { dg-final { scan-assembler ".group\[\t \]*_ZZ5lambyvENKUlvE_clEv,\[^\n\r\]*,#comdat" { target { *-*-solaris2.* && { ! gas } } } } } -// { dg-final { scan-assembler ".group\[\t \]*_ZZ5lambyvENUlvE_4_FUNEv,\[^\n\r\]*,#comdat" { target { *-*-solaris2.* && { ! gas } } } } } +// { dg-final { scan-assembler ".group\[\t \]*_ZZ5lambyvENKUlvE_clEv,\[^\n\r\]*,#comdat" { target solaris_as } } } +// { dg-final { scan-assembler ".group\[\t \]*_ZZ5lambyvENUlvE_4_FUNEv,\[^\n\r\]*,#comdat" { target solaris_as } } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C index 6cf76446f402..a0ebabf58539 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C @@ -1,6 +1,6 @@ // PR debug/53235 // { dg-options "-gdwarf-4 -fdebug-types-section" } -// { dg-final { scan-assembler-times "debug_types" 2 { xfail { powerpc-ibm-aix* || { *-*-darwin* || { *-*-solaris2.* && { comdat_group && { ! gas } } } } } } } } +// { dg-final { scan-assembler-times "debug_types" 2 { xfail { powerpc-ibm-aix* || { *-*-darwin* || solaris_as } } } } } namespace E { class O {}; diff --git a/gcc/testsuite/g++.dg/eh/pr119507.C b/gcc/testsuite/g++.dg/eh/pr119507.C index 168779b96ca9..467b1bc98ce4 100644 --- a/gcc/testsuite/g++.dg/eh/pr119507.C +++ b/gcc/testsuite/g++.dg/eh/pr119507.C @@ -2,7 +2,7 @@ // ARM EABI has its own exception handling data handling and does not use gcc_except_table // { dg-skip-if "!TARGET_EXCEPTION_DATA" { arm_eabi } } // Solaris/SPARC as uses a widely different COMDAT section syntax. -// { dg-skip-if "Solaris/SPARC as syntax" { sparc*-*-solaris2* && { ! gas } } } +// { dg-skip-if "Solaris/SPARC as syntax" { sparc*-*-* && solaris_as } } // Force off function sections // Force on exceptions // { dg-options "-fno-function-sections -fexceptions" } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr61159.c b/gcc/testsuite/gcc.c-torture/compile/pr61159.c index d2986d463938..bcab8d996e6e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr61159.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr61159.c @@ -1,6 +1,6 @@ /* { dg-require-alias "" } */ /* { dg-require-weak "" } */ -/* { dg-xfail-if "weak alias" { powerpc-ibm-aix* || { *86*-*-solaris* && { ! gas } } } } */ +/* { dg-xfail-if "weak alias" { powerpc-ibm-aix* || { x86 && solaris_as } } } */ static int dummy = 0; extern int foo __attribute__((__weak__, __alias__("dummy"))); diff --git a/gcc/testsuite/gcc.dg/attr-weakref-1.c b/gcc/testsuite/gcc.dg/attr-weakref-1.c index 1d25d9c2d417..8c3478034001 100644 --- a/gcc/testsuite/gcc.dg/attr-weakref-1.c +++ b/gcc/testsuite/gcc.dg/attr-weakref-1.c @@ -16,7 +16,7 @@ // { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } // { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } // One subtest doesn't assemble with the Solaris/x86 as (PR ipa/70582) -// { dg-additional-options "-DSOLARIS_X86_AS" { target { *86*-*-solaris2* && { ! gas } } } } +// { dg-additional-options "-DSOLARIS_X86_AS" { target { x86 && solaris_as } } } // { dg-additional-sources "attr-weakref-1a.c" } // Copyright 2005 Free Software Foundation, Inc. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cswtch-6.c b/gcc/testsuite/gcc.dg/tree-ssa/cswtch-6.c index 96376815e53d..b8ebddba3614 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/cswtch-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/cswtch-6.c @@ -40,4 +40,4 @@ f1 (int v, int w) foo (i, j); } -/* { dg-final { scan-assembler ".rodata.cst16" { xfail { sparc*-*-solaris2* && { ! gas } } } } } */ +/* { dg-final { scan-assembler ".rodata.cst16" { xfail { sparc*-*-* && solaris_as } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c b/gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c index 555992337c35..209d9955c844 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c @@ -45,4 +45,4 @@ f1 (int v, int w) foo (i, j); } -/* { dg-final { scan-assembler ".rodata.cst32" { xfail { sparc*-*-solaris2* && { ! gas } } } } } */ +/* { dg-final { scan-assembler ".rodata.cst32" { xfail { sparc*-*-* && solaris_as } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c index b2266beed68a..657577b643a2 100644 --- a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c @@ -1,7 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -mavx512cd" } */ /* { dg-require-effective-target avx512cd } */ -/* { dg-skip-if "PR target/114150" { *-*-solaris2.* && { ! gas } } } */ +/* { dg-skip-if "PR target/114150" { solaris_as } } */ #define HAVE_512 #define AVX512CD diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c index 56397646a272..a5134d9564fe 100644 --- a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c @@ -1,7 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -mavx512cd" } */ /* { dg-require-effective-target avx512cd } */ -/* { dg-skip-if "PR target/114150" { *-*-solaris2.* && { ! gas } } } */ +/* { dg-skip-if "PR target/114150" { solaris_as } } */ #define HAVE_512 #define AVX512CD diff --git a/gcc/testsuite/gcc.target/i386/pr91298-1.c b/gcc/testsuite/gcc.target/i386/pr91298-1.c index fc7950ca8ed3..d3531a089481 100644 --- a/gcc/testsuite/gcc.target/i386/pr91298-1.c +++ b/gcc/testsuite/gcc.target/i386/pr91298-1.c @@ -1,7 +1,7 @@ /* PR target/91298 */ /* { dg-do assemble } */ /* { dg-options "-O2 -g -fdollars-in-identifiers" } */ -/* { dg-xfail-if "No support for $ in identifiers" { *-*-solaris2.* && { ! gas } } } */ +/* { dg-xfail-if "No support for $ in identifiers" { solaris_as } } */ int $a[18]; int *foo (void) { return &$a[0]; } diff --git a/gcc/testsuite/gcc.target/i386/pr91298-2.c b/gcc/testsuite/gcc.target/i386/pr91298-2.c index f2d7d3a2907f..212ad7e2e267 100644 --- a/gcc/testsuite/gcc.target/i386/pr91298-2.c +++ b/gcc/testsuite/gcc.target/i386/pr91298-2.c @@ -1,6 +1,6 @@ /* PR target/91298 */ /* { dg-do assemble { target fpic } } */ /* { dg-options "-O2 -g -fdollars-in-identifiers -fpic" } */ -/* { dg-xfail-if "No support for $ in identifiers" { *-*-solaris2.* && { ! gas } } } */ +/* { dg-xfail-if "No support for $ in identifiers" { solaris_as } } */ #include "pr91298-1.c" diff --git a/gcc/testsuite/lib/et-static.def b/gcc/testsuite/lib/et-static.def index ac8c17deea5e..58bbed8faf6c 100644 --- a/gcc/testsuite/lib/et-static.def +++ b/gcc/testsuite/lib/et-static.def @@ -27,3 +27,7 @@ ld_at_file HAVE_LD_AT_FILE your linker supports GNU style response files + +solaris_as +HAVE_SOLARIS_AS +using the Solaris assembler diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index b010d652b9a9..726a8444f3a3 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -11942,7 +11942,7 @@ proc check_effective_target_sha { } { proc check_effective_target_avx512dq { } { # PR target/123415: In addition to the %k0 issue also affecting avx512bw, # Solaris/x86 as doesn't accept {sae} syntax. - if { [istarget *-*-solaris2*] && ![check_effective_target_gas] } { + if { [check_effective_target_solaris_as] } { return 0; } return [check_no_compiler_messages avx512dq object { @@ -11962,7 +11962,7 @@ proc check_effective_target_avx512dq { } { proc check_effective_target_avx512bw { } { # PR target/123415: Solaris/x86 doesn't accept %k0 as source/destination # in some cases. - if { [istarget *-*-solaris2*] && ![check_effective_target_gas] } { + if { [check_effective_target_solaris_as] } { return 0; } return [check_no_compiler_messages avx512bw object {