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;
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;