diff options
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 5843a50e57b..749291c63e3 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6668,8 +6668,9 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) if (PRIMARY_TEMPLATE_P (gen_tmpl)) clone_function_decl (r, /*update_method_vec_p=*/0); } - else if (IDENTIFIER_OPNAME_P (DECL_NAME (r))) - grok_op_properties (r, (complain & tf_error) != 0); + else if (IDENTIFIER_OPNAME_P (DECL_NAME (r)) + && !grok_op_properties (r, (complain & tf_error) != 0)) + return error_mark_node; if (DECL_FRIEND_P (t) && DECL_FRIEND_CONTEXT (t)) SET_DECL_FRIEND_CONTEXT (r, |