+2018-03-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84662
+ * pt.c (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Use
+ RETURN instead of return.
+ <case POINTER_PLUS_EXPR>: Likewise.
+ <case CONVERT_EXPR>: If op0 is error_mark_node, just return
+ it instead of wrapping it into CONVERT_EXPR.
+
2018-03-02 Jason Merrill <jason@redhat.com>
Fix MIPS16 ICE.
if (targs)
targs = tsubst_template_args (targs, args, complain, in_decl);
if (targs == error_mark_node)
- return error_mark_node;
+ RETURN (error_mark_node);
if (TREE_CODE (templ) == SCOPE_REF)
{
tree name = TREE_OPERAND (templ, 1);
tree tid = lookup_template_function (name, targs);
TREE_OPERAND (templ, 1) = tid;
- return templ;
+ RETURN (templ);
}
if (variable_template_p (templ))
{
tree type = tsubst (TREE_TYPE (t), args, complain, in_decl);
tree op0 = RECUR (TREE_OPERAND (t, 0));
+ if (op0 == error_mark_node)
+ RETURN (error_mark_node);
RETURN (build1 (CONVERT_EXPR, type, op0));
}
{
tree op0 = RECUR (TREE_OPERAND (t, 0));
tree op1 = RECUR (TREE_OPERAND (t, 1));
- return fold_build_pointer_plus (op0, op1);
+ RETURN (fold_build_pointer_plus (op0, op1));
}
case SCOPE_REF: