re PR c++/49353 (C++ frontend should not declare function EXTERN when it forces them...
authorJason Merrill <jason@redhat.com>
Thu, 7 Jul 2011 02:58:33 +0000 (22:58 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 7 Jul 2011 02:58:33 +0000 (22:58 -0400)
PR c++/49353
* semantics.c (expand_or_defer_fn_1): Clear DECL_EXTERNAL
on kept inlines.

From-SVN: r175954

gcc/cp/ChangeLog
gcc/cp/semantics.c

index 8a25c89de87baab5f87bc95fa9583197caa00cf2..3957d5ade635d3c0bbe67fa98abd914e070050c9 100644 (file)
@@ -1,5 +1,9 @@
 2011-07-06  Jason Merrill  <jason@redhat.com>
 
+       PR c++/49353
+       * semantics.c (expand_or_defer_fn_1): Clear DECL_EXTERNAL
+       on kept inlines.
+
        PR c++/49568
        * method.c (make_thunk, use_thunk): Copy DECL_COMDAT.
 
index fa22bc9411fc6e0c83b97056be4f96f67fd24583..5c53a18511c4c037b812e6df386eb158fb9c644f 100644 (file)
@@ -3633,7 +3633,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