http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54083



Dominique d'Humieres <dominiq at lps dot ens.fr> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |howarth at bromo dot

                   |                            |med.uc.edu



--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-09-23 
21:35:49 UTC ---

A patch has been posted at

http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01602.html and I have also tested

it on x86_64-apple-darwin10. Note that it won't fix the failure for 32-bit

hppa*-*-hpux*.



The fix used also works for gcc.dg/attr-weakref-1.c



--- ../_clean/gcc/testsuite/gcc.dg/attr-weakref-1.c    2012-03-12

19:39:57.000000000 +0100

+++ gcc/testsuite/gcc.dg/attr-weakref-1.c    2012-09-23 23:23:33.000000000

+0200

@@ -4,12 +4,13 @@

 // This test requires support for undefined weak symbols.  This support

 // is not available on hppa*-*-hpux*.  The test is skipped rather than

 // xfailed to suppress the warning that would otherwise arise.

-// { dg-skip-if "" { "*-*-darwin*" "hppa*-*-hpux*" } "*" { "" } }

+// { dg-skip-if "" { "hppa*-*-hpux*" } "*" { "" } }

 // For kernel modules and static RTPs, the loader treats undefined weak

 // symbols in the same way as undefined strong symbols.  The test

 // therefore fails to load, so skip it.

 // { dg-skip-if "" { "*-*-vxworks*" && nonpic } "*" { "-non-static" } }

 // { dg-options "-O2" }

+// { dg-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } }

 // { dg-additional-sources "attr-weakref-1a.c" }



 // Copyright 2005 Free Software Foundation, Inc.



For the record, following the suggestions of Richard Guenther and Tobias Burnus

on IRC, I have tested the attached patch which mimics gcc.dg/attr-weakref-1.c

and also works on x86_64-apple-darwin10 and powerpc-apple-darwin9.

Reply via email to