OSDN Git Service

* config/i386/winnt.c (i386_pe_asm_named_section): Be prepared for an
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 1 Dec 2013 12:22:38 +0000 (12:22 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 1 Dec 2013 12:22:38 +0000 (12:22 +0000)
identifier node.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@205570 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 0374bb8..3249195 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 be8fa82..62d5a97 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"));
     }