public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9190] testsuite: Fix gcc.dg/attr-weakref-1.c on Solaris/x86 with as [PR70582]
@ 2024-02-27  7:21 Rainer Orth
  0 siblings, 0 replies; only message in thread
From: Rainer Orth @ 2024-02-27  7:21 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8e8eac3dea017eae739eb79d540887bb2cf1dc9f

commit r14-9190-g8e8eac3dea017eae739eb79d540887bb2cf1dc9f
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date:   Tue Feb 27 08:20:25 2024 +0100

    testsuite: Fix gcc.dg/attr-weakref-1.c on Solaris/x86 with as [PR70582]
    
    gcc.dg/attr-weakref-1.c FAILs on 32 and 64-bit Solaris/x86 with the
    native assembler:
    
    FAIL: gcc.dg/attr-weakref-1.c (test for excess errors)
    UNRESOLVED: gcc.dg/attr-weakref-1.c compilation failed to produce executable
    
    Excess errors:
    Assembler: attr-weakref-1.c
            "/var/tmp//ccUSaysF.s", line 171 : Multiply defined symbol: "Wv3a"
    
    This is a bug in the native as, which isn't seeing fixes recently.
    
    Since only a single subtest is affected, this patch omits that one.
    
    Tested on i386-pc-solaris2.11 (as and gas) and x86_64-pc-linux-gnu.
    
    2024-02-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
    
            gcc/testsuite:
            PR ipa/70582
            * gcc.dg/attr-weakref-1.c (dg-additional-options): Define
            SOLARIS_X86_AS as appropriate.
            (lv3, Wv3a, pv3a): Wrap in !SOLARIS_X86_AS.
            (main): Likewise for chk (pv3a).

Diff:
---
 gcc/testsuite/gcc.dg/attr-weakref-1.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/attr-weakref-1.c b/gcc/testsuite/gcc.dg/attr-weakref-1.c
index 9e14b605be0..f13aee446ce 100644
--- a/gcc/testsuite/gcc.dg/attr-weakref-1.c
+++ b/gcc/testsuite/gcc.dg/attr-weakref-1.c
@@ -14,6 +14,8 @@
 // { dg-options "-O2" }
 // { 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-sources "attr-weakref-1a.c" }
 
 // Copyright 2005 Free Software Foundation, Inc.
@@ -46,9 +48,11 @@ vtype gv2;
 static vtype Wv2a __attribute__((weakref ("gv2")));
 static vtype *pv2a USED = &Wv2a;
 
+#if !defined SOLARIS_X86_AS
 static vtype lv3;
 static vtype Wv3a __attribute__((weakref ("lv3")));
 static vtype *pv3a USED = &Wv3a;
+#endif
 
 extern vtype uv4;
 static vtype Wv4a __attribute__((weakref ("uv4")));
@@ -192,7 +196,9 @@ extern ftype wf14 __attribute__((weak));
 int main () {
   chk (!pv1a);
   chk (pv2a);
+#if !defined(SOLARIS_X86_AS)
   chk (pv3a);
+#endif
   chk (pv4a);
   chk (pv4);
   chk (pv5a);

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

only message in thread, other threads:[~2024-02-27  7:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27  7:21 [gcc r14-9190] testsuite: Fix gcc.dg/attr-weakref-1.c on Solaris/x86 with as [PR70582] 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).