aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 440df1ea231..5ff08211ebc 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -4782,6 +4782,8 @@ push_template_decl_real (tree decl, bool is_friend)
error ("got %d template parameters for %q#T",
TREE_VEC_LENGTH (a), current);
error (" but %d required", TREE_VEC_LENGTH (t));
+ /* Avoid crash in import_export_decl. */
+ DECL_INTERFACE_KNOWN (decl) = 1;
return error_mark_node;
}
@@ -15008,8 +15010,10 @@ fn_type_unification (tree fn,
processing_template_decl += incomplete;
input_location = DECL_SOURCE_LOCATION (fn);
+ TREE_VALUE (tinst) = explicit_targs;
fntype = tsubst (TREE_TYPE (fn), explicit_targs,
complain | tf_partial, NULL_TREE);
+ TREE_VALUE (tinst) = targs;
input_location = loc;
processing_template_decl -= incomplete;