]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/42854 (FAIL: gcc.dg/darwin-weakimport-[13].c scan-assembler-not *)
authorJack Howarth <howarth@bromo.med.uc.edu>
Mon, 15 Feb 2010 23:52:53 +0000 (23:52 +0000)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 15 Feb 2010 23:52:53 +0000 (00:52 +0100)
PR target/42854
* config/darwin.h (ASM_WEAKEN_DECL): Don't check weak attribute
if weak_import attribute is present.
* config/darwin.c (machopic_select_section): Likewise.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r156786

gcc/ChangeLog
gcc/config/darwin.c
gcc/config/darwin.h

index 9b0682c897759a0a708d774dc17f63210c36e7d9..9f65cdde1fb7ab2273e15906153bea6d503f7687 100644 (file)
@@ -1,3 +1,11 @@
+2010-02-16  Jack Howarth <howarth@bromo.med.uc.edu>
+            Jakub Jelinek <jakub@redhat.com>
+
+       PR target/42854
+       * config/darwin.h (ASM_WEAKEN_DECL): Don't check weak attribute
+       if weak_import attribute is present.
+       * config/darwin.c (machopic_select_section): Likewise.
+
 2010-02-15  Joern Rennecke  <joern.rennecke@embecosm.com>
 
        * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Document.
index 18800634c31e3764a0b63c469dfca31fe1fdcfe0..3ca507cc0a3724f2e6ac124b2bd585a678868b66 100644 (file)
@@ -1177,9 +1177,8 @@ machopic_select_section (tree decl,
 {
   bool weak = (DECL_P (decl)
               && DECL_WEAK (decl)
-              && (lookup_attribute ("weak", DECL_ATTRIBUTES (decl))
-                  || ! lookup_attribute ("weak_import",
-                                         DECL_ATTRIBUTES (decl))));
+              && !lookup_attribute ("weak_import",
+              DECL_ATTRIBUTES (decl)));
   section *base_section;
 
   switch (categorize_decl_for_section (decl, reloc))
index c42bf34a25511329a051ca3051cc2a8b3b3bf1be..763040bfe4c6dcbddfc1092d4a85d1f65417a75c 100644 (file)
@@ -502,8 +502,7 @@ extern GTY(()) int darwin_ms_struct;
       targetm.asm_out.globalize_label (FILE, NAME);                    \
     if (DECL_EXTERNAL (DECL))                                          \
       fputs ("\t.weak_reference ", FILE);                              \
-    else if (! lookup_attribute ("weak", DECL_ATTRIBUTES (DECL))       \
-       && lookup_attribute ("weak_import", DECL_ATTRIBUTES (DECL)))    \
+    else if (lookup_attribute ("weak_import", DECL_ATTRIBUTES (DECL))) \
       break;                                                           \
     else if (TREE_PUBLIC (DECL))                                       \
       fputs ("\t.weak_definition ", FILE);                             \