aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/winnt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index fe5081d..7069c40 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -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;