public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] testsuite: Fix gcc.dg/pr111409.c on Solaris/SPARC with as
@ 2023-11-28 12:56 Rainer Orth
  0 siblings, 0 replies; only message in thread
From: Rainer Orth @ 2023-11-28 12:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: Omar Sandoval

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

gcc.dg/pr111409.c FAILs on Solaris/SPARC with the native as:

FAIL: gcc.dg/pr111409.c scan-assembler-times .section\\\\s+.debug_macro 1

Unlike most other ELF targets, that assembler requires the section name to
be double-quoted.  This patch allows for that.  It also expects \t to
separate .section directive and name like other similar tests, and escapes
literal dots.

Tested on sparc-sun-solaris2.11 (as and gas) and i386-pc-solaris2.11 (as
and gas).

According to gcc-testresults, the test also FAILs on
powerpc-ibm-aix7.2.5.0 and hppa64-hp-hpux11.11.  AIX seems to be the
same issue, while HP/UX apparently has a different section syntax.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2023-11-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	* gcc.dg/pr111409.c: Allow for " before .debug_macro.
	Quote literals dots.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2sparc-testsuite-pr111409.patch --]
[-- Type: text/x-patch, Size: 744 bytes --]

# HG changeset patch
# Parent  fd39a5a60b8433590aee9d4e91f3683675d37a0b
testsuite: Fix gcc.dg/pr111409.c on Solaris/SPARC with as

diff --git a/gcc/testsuite/gcc.dg/pr111409.c b/gcc/testsuite/gcc.dg/pr111409.c
--- a/gcc/testsuite/gcc.dg/pr111409.c
+++ b/gcc/testsuite/gcc.dg/pr111409.c
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-skip-if "split DWARF unsupported" { *-*-darwin* } } */
 /* { dg-options "-gsplit-dwarf -g3 -dA" } */
-/* { dg-final { scan-assembler-times {.section\s+.debug_macro} 1 } } */
-/* { dg-final { scan-assembler-not {.byte\s+0x7\s*#\s*Import} } } */
+/* { dg-final { scan-assembler-times {\.section\t"?\.debug_macro} 1 } } */
+/* { dg-final { scan-assembler-not {\.byte\s+0x7\s*#\s*Import} } } */
 
 #define foo 1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-28 12:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-28 12:56 [COMMITTED] testsuite: Fix gcc.dg/pr111409.c on Solaris/SPARC with as Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).