Message ID | 1372721221-6201-3-git-send-email-adam@jessamine.co.uk |
---|---|
State | New |
Headers | show |
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3847a1d..fbdd8ec6 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -18847,6 +18847,9 @@ instantiate_decl (tree d, int defer_ok, tree fn_context; bool nested; + if (TREE_CODE (d) == TEMPLATE_DECL) + return d; + /* This function should only be used to instantiate templates for functions and static member variables. */ gcc_assert (VAR_OR_FUNCTION_DECL_P (d));