commit 600157c6ee5b6425f47b24d03dceaa4b5ac06359 Author: Jason Merrill Date: Wed Jul 6 18:01:40 2011 -0400 PR c++/49353 * semantics.c (expand_or_defer_fn_1): Clear DECL_EXTERNAL on kept inlines. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 6fcf0da..5caeafe 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3634,7 +3634,10 @@ expand_or_defer_fn_1 (tree fn) && !DECL_REALLY_EXTERN (fn)) || (flag_keep_inline_dllexport && lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn)))) - mark_needed (fn); + { + mark_needed (fn); + DECL_EXTERNAL (fn) = 0; + } } /* There's no reason to do any of the work here if we're only doing