aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJack Howarth <howarth@bromo.med.uc.edu>2010-02-15 23:52:53 +0000
committerJakub Jelinek <jakub@gcc.gnu.org>2010-02-16 00:52:53 +0100
commit3bf6b40332b119f97899eb519825b68fdede9cff (patch)
treefff12ed514e5dae13576d677404f9e7f3b18f3bf /gcc/config
parent6dbe8a32689db1c38aa106d678754f069bccd682 (diff)
downloadgcc-3bf6b40332b119f97899eb519825b68fdede9cff.zip
gcc-3bf6b40332b119f97899eb519825b68fdede9cff.tar.gz
gcc-3bf6b40332b119f97899eb519825b68fdede9cff.tar.bz2
re PR target/42854 (FAIL: gcc.dg/darwin-weakimport-[13].c scan-assembler-not *)
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/darwin.c5
-rw-r--r--gcc/config/darwin.h3
2 files changed, 3 insertions, 5 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 1880063..3ca507c 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -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))
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index c42bf34..763040b 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -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); \