]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
winnt.c (i386_pe_asm_named_section): Be prepared for an identifier node.
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 1 Dec 2013 12:22:38 +0000 (12:22 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 1 Dec 2013 12:22:38 +0000 (12:22 +0000)
* config/i386/winnt.c (i386_pe_asm_named_section): Be prepared for an
identifier node.

From-SVN: r205570

gcc/ChangeLog
gcc/config/i386/winnt.c

index 0374bb83d0225a85b0c30bcefca64c9b35e8e398..3249195de5dcdac783015d2237fe0a8b1336373f 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-01  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * config/i386/winnt.c (i386_pe_asm_named_section): Be prepared for an
+       identifier node.
+
 2013-11-28  Uros Bizjak  <ubizjak@gmail.com>
 
        Backport from mainline
index be8fa827b6e48c417c80515949798f52ad95ead3..62d5a97bf4c9cb0795f20c43aeb1a3eb5844a0d3 100644 (file)
@@ -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"));
     }