]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix gcc.dg/tree-ssa/cswtch-[67].c on Solaris/SPARC with as
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 2 Sep 2025 07:28:40 +0000 (09:28 +0200)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 2 Sep 2025 07:28:40 +0000 (09:28 +0200)
The gcc.dg/tree-ssa/cswtch-[67].c tests FAIL on Solaris/SPARC with the
native as:

FAIL: gcc.dg/tree-ssa/cswtch-6.c scan-assembler .rodata.cst16
FAIL: gcc.dg/tree-ssa/cswtch-7.c scan-assembler .rodata.cst32

The issue is the same in both cases: compared to the gas version, with
as there's only

- .section .rodata.cst32,"aM",@progbits,32
+ .section ".rodata"

It turns out that varasm.c (mergeable_constant_section) only emits the
former if HAVE_GAS_SHF_MERGE, which is 0 with the native as.

Fixed by xfailing the tests in this case.

Tested on sparc-sun-solaris2.11 with both as and gas.

2025-07-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc/testsuite:
* gcc.dg/tree-ssa/cswtch-6.c (dg-final): xfail on
sparc*-*-solaris2* && !gas.
* gcc.dg/tree-ssa/cswtch-7.c: Likewise.

gcc/testsuite/gcc.dg/tree-ssa/cswtch-6.c
gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c

index d765a03aa19573b9ff86f983e682862d9c743c78..96376815e53dd2b2196ca673156d15e27c9640e9 100644 (file)
@@ -40,4 +40,4 @@ f1 (int v, int w)
   foo (i, j);
 }
 
-/* { dg-final { scan-assembler ".rodata.cst16" } } */
+/* { dg-final { scan-assembler ".rodata.cst16" { xfail { sparc*-*-solaris2* && { ! gas } } } } } */
index 7b79780771b41b405cfe3abfbf5d2ec8c711d514..555992337c350b8fbf29190b0a4ab0ad3ff528d7 100644 (file)
@@ -45,4 +45,4 @@ f1 (int v, int w)
   foo (i, j);
 }
 
-/* { dg-final { scan-assembler ".rodata.cst32" } } */
+/* { dg-final { scan-assembler ".rodata.cst32" { xfail { sparc*-*-solaris2* && { ! gas } } } } } */