aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/config/i386/winnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/config/i386/winnt.c')
-rw-r--r--gcc-4.8/gcc/config/i386/winnt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc-4.8/gcc/config/i386/winnt.c b/gcc-4.8/gcc/config/i386/winnt.c
index 7e7c1555a..1e49a461a 100644
--- a/gcc-4.8/gcc/config/i386/winnt.c
+++ b/gcc-4.8/gcc/config/i386/winnt.c
@@ -547,8 +547,9 @@ i386_pe_asm_named_section (const char *name, unsigned int flags,
sets 'discard' characteristic, rather than telling linker
to warn of size or content mismatch, so do the same. */
bool discard = (flags & SECTION_CODE)
- || lookup_attribute ("selectany",
- DECL_ATTRIBUTES (decl));
+ || (TREE_CODE (decl) != IDENTIFIER_NODE
+ && lookup_attribute ("selectany",
+ DECL_ATTRIBUTES (decl)));
fprintf (asm_out_file, "\t.linkonce %s\n",
(discard ? "discard" : "same_size"));
}