* pt.c (mark_decl_instantiated): Clear DECL_EXTERNAL.
From-SVN: r261085
+2018-06-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/58281 - explicit instantiation of constexpr
+ * pt.c (mark_decl_instantiated): Clear DECL_EXTERNAL.
+
2018-05-31 Jason Merrill <jason@redhat.com>
* pt.c (instantiate_decl): Any defaulted function is defined.
linkonce sections. */
else if (TREE_PUBLIC (result))
maybe_make_one_only (result);
+ if (TREE_CODE (result) == FUNCTION_DECL
+ && DECL_TEMPLATE_INSTANTIATED (result))
+ /* If the function has already been instantiated, clear DECL_EXTERNAL,
+ since start_preparsed_function wouldn't have if we had an earlier
+ extern explicit instantiation. */
+ DECL_EXTERNAL (result) = 0;
}
/* If EXTERN_P, then this function will not be emitted -- unless