From 13eee16e925218afe469a799ca17aec1e607e568 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Tue, 2 Sep 2025 09:28:40 +0200 Subject: testsuite: Fix gcc.dg/tree-ssa/cswtch-[67].c on Solaris/SPARC with as 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 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 | 2 +- gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cswtch-6.c b/gcc/testsuite/gcc.dg/tree-ssa/cswtch-6.c index d765a03..9637681 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" } } */ +/* { dg-final { scan-assembler ".rodata.cst16" { xfail { sparc*-*-solaris2* && { ! gas } } } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c b/gcc/testsuite/gcc.dg/tree-ssa/cswtch-7.c index 7b797807..5559923 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" } } */ +/* { dg-final { scan-assembler ".rodata.cst32" { xfail { sparc*-*-solaris2* && { ! gas } } } } } */ -- cgit v1.1