Hi, this patch takes care that for C/C++ inlines aren't dll-exported.
ChangeLog 2013-09-11 Kai Tietz <kti...@redhat.com> * config/i386/winnt-cxx.c (i386_pe_type_dllexport_p): Don't dll-export inline-functions. * config/i386/winnt.c (i386_pe_determine_dllexport_p): Likewise. Tested for x86_64-w64-mingw32 and i686-w64-mingw32. I will apply this in a couple of hours, if there are no objections. Regards, Kai Index: winnt-cxx.c =================================================================== --- winnt-cxx.c (Revision 202491) +++ winnt-cxx.c (Arbeitskopie) @@ -65,6 +65,13 @@ i386_pe_type_dllexport_p (tree decl) if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE && DECL_ARTIFICIAL (decl) && !DECL_THUNK_P (decl)) return false; + if (TREE_CODE (decl) == FUNCTION_DECL + && DECL_DECLARED_INLINE_P (decl)) + { + if (DECL_REALLY_EXTERN (decl) + || !flag_keep_inline_dllexport) + return false; + } return true; } Index: winnt.c =================================================================== --- winnt.c (Revision 202491) +++ winnt.c (Arbeitskopie) @@ -110,6 +110,11 @@ i386_pe_determine_dllexport_p (tree decl) if (!TREE_PUBLIC (decl)) return false; + if (TREE_CODE (decl) == FUNCTION_DECL + && DECL_DECLARED_INLINE_P (decl) + && !flag_keep_inline_dllexport) + return false; + if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl))) return true;