testsuite: Allow for non-SECTION_MERGE systems in gcc.dg/pr115066.c [PR115066]

Message ID ydded9vv1lh.fsf@CeBiTec.Uni-Bielefeld.DE
State Committed
Commit 6c97934fde7caf483ffc5079eb8ca4af04354a2c
Headers
Series testsuite: Allow for non-SECTION_MERGE systems in gcc.dg/pr115066.c [PR115066] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed

Commit Message

Rainer Orth May 21, 2024, 11:36 a.m. UTC
  gcc.dg/pr115066.c currently FAILs on Solaris/SPARC with the native as:

FAIL: gcc.dg/pr115066.c scan-assembler \\\\.byte\\\\t0xb\\\\t# Define macro strx

Instead of the expected

	.byte   0xb     ! Define macro strx

the assembler output contains

	.byte   0x1     ! Define macro

Apparently this happens because the Solaris as/ld combo doesn't support
SHF_MERGE.

While I initially meant to just skip the test on sparc*-*-solaris2* && !gas,
Tom suggested to allow for both forms instead, which is what his patch
does.

Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11 (as and gas
each) and x86_64-pc-linux-gnu.

Ok for trunk?

	Rainer
  

Comments

Jason Merrill May 21, 2024, 6:04 p.m. UTC | #1
On 5/21/24 07:36, Rainer Orth wrote:
> gcc.dg/pr115066.c currently FAILs on Solaris/SPARC with the native as:
> 
> FAIL: gcc.dg/pr115066.c scan-assembler \\\\.byte\\\\t0xb\\\\t# Define macro strx
> 
> Instead of the expected
> 
> 	.byte   0xb     ! Define macro strx
> 
> the assembler output contains
> 
> 	.byte   0x1     ! Define macro
> 
> Apparently this happens because the Solaris as/ld combo doesn't support
> SHF_MERGE.
> 
> While I initially meant to just skip the test on sparc*-*-solaris2* && !gas,
> Tom suggested to allow for both forms instead, which is what his patch
> does.
> 
> Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11 (as and gas
> each) and x86_64-pc-linux-gnu.
> 
> Ok for trunk?

OK.
  

Patch

# HG changeset patch
# Parent  630ea4594490d9bd4911b95d13eaca62a8cd4dba
testsuite: Allow for non-SECTION_MERGE systems in gcc.dg/pr115066.c [PR115066]

diff --git a/gcc/testsuite/gcc.dg/pr115066.c b/gcc/testsuite/gcc.dg/pr115066.c
--- a/gcc/testsuite/gcc.dg/pr115066.c
+++ b/gcc/testsuite/gcc.dg/pr115066.c
@@ -3,6 +3,6 @@ 
 /* { dg-options "-gsplit-dwarf -g3 -dA -gdwarf-4" } */
 /* { dg-final { scan-assembler-times {\.section\t"?\.debug_macro} 1 } } */
 /* { dg-final { scan-assembler-not {\.byte\t0x5\t[^\n\r]* Define macro strp} } } */
-/* { dg-final { scan-assembler {\.byte\t0xb\t[^\n\r]* Define macro strx} } } */
+/* { dg-final { scan-assembler {\.byte\t0xb\t[^\n\r]* Define macro strx|\.byte\t0x1\t[^\n\r]* Define macro} } } */
 
 #define foo 1