diff options
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 68250c2..de9f828 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -9850,7 +9850,8 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) if (e1 == error_mark_node || e2 == error_mark_node) return error_mark_node; - return fold_build2 (TREE_CODE (t), TREE_TYPE (t), e1, e2); + return fold_build2_loc (input_location, + TREE_CODE (t), TREE_TYPE (t), e1, e2); } case NEGATE_EXPR: @@ -9860,7 +9861,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) if (e == error_mark_node) return error_mark_node; - return fold_build1 (TREE_CODE (t), TREE_TYPE (t), e); + return fold_build1_loc (input_location, TREE_CODE (t), TREE_TYPE (t), e); } case TYPENAME_TYPE: @@ -14073,12 +14074,12 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict) /* If only one of the bounds used a MINUS_EXPR, compensate by adding one to the other bound. */ if (parm_cst && !arg_cst) - parm_max = fold_build2 (PLUS_EXPR, + parm_max = fold_build2_loc (input_location, PLUS_EXPR, integer_type_node, parm_max, integer_one_node); else if (arg_cst && !parm_cst) - arg_max = fold_build2 (PLUS_EXPR, + arg_max = fold_build2_loc (input_location, PLUS_EXPR, integer_type_node, arg_max, integer_one_node); |