OSDN Git Service

* config/i386/winnt.c (i386_pe_determine_dllexport_p): Don't
authordannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Jul 2009 06:09:39 +0000 (06:09 +0000)
committerdannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Jul 2009 06:09:39 +0000 (06:09 +0000)
dllexport if !TREE_PUBLIC.
(i386_pe_maybe_record_exported_symbol): Assert TREE_PUBLIC.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149525 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 4356b5a..c8a3950 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-12  Danny Smith  <dansmister@gmail.com>
+
+       * config/i386/winnt.c (i386_pe_determine_dllexport_p): Don't
+       dllexport if !TREE_PUBLIC.
+       (i386_pe_maybe_record_exported_symbol): Assert TREE_PUBLIC.
+
 2009-07-11  Anatoly Sokolov  <aesok@post.ru>
 
        * config/avr/avr.h (TARGET_CPU_CPP_BUILTINS): Redefine.
index fe5081d..7069c40 100644 (file)
@@ -107,6 +107,10 @@ i386_pe_determine_dllexport_p (tree decl)
   if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FUNCTION_DECL)
     return false;
 
+  /* Don't export local clones of dllexports.  */
+  if (!TREE_PUBLIC (decl))
+    return false;
+
   if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl)))
     return true;
 
@@ -601,6 +605,8 @@ i386_pe_maybe_record_exported_symbol (tree decl, const char *name, int is_data)
   if (!SYMBOL_REF_DLLEXPORT_P (symbol))
     return;
 
+  gcc_assert (TREE_PUBLIC (decl));
+
   p = (struct export_list *) ggc_alloc (sizeof *p);
   p->next = export_head;
   p->name = name;