From: Eric Botcazou Date: Sun, 1 Dec 2013 12:22:38 +0000 (+0000) Subject: winnt.c (i386_pe_asm_named_section): Be prepared for an identifier node. X-Git-Tag: releases/gcc-4.7.4~377 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26c11d53d8c1291bc853c4f6544ce7a6129331a0;p=thirdparty%2Fgcc.git winnt.c (i386_pe_asm_named_section): Be prepared for an identifier node. * config/i386/winnt.c (i386_pe_asm_named_section): Be prepared for an identifier node. From-SVN: r205570 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0374bb83d022..3249195de5dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-12-01 Eric Botcazou + + * config/i386/winnt.c (i386_pe_asm_named_section): Be prepared for an + identifier node. + 2013-11-28 Uros Bizjak Backport from mainline diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index be8fa827b6e4..62d5a97bf4c9 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -531,8 +531,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")); }