Commit 7d072b97 by Jason Merrill Committed by Jason Merrill

PR c++/58281 - explicit instantiation of constexpr

	* pt.c (mark_decl_instantiated): Clear DECL_EXTERNAL.

From-SVN: r261085
parent 9760467e
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.
......
......@@ -22168,6 +22168,12 @@ mark_decl_instantiated (tree result, int extern_p)
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment