Commit e9ea372d by Jason Merrill Committed by Jason Merrill

* cp-gimplify.c (cp_fold): Use fold_build*.

From-SVN: r231195
parent e9e32ee6
2015-12-02 Jason Merrill <jason@redhat.com>
* cp-gimplify.c (cp_fold): Use fold_build*.
2015-12-02 Joseph Myers <joseph@codesourcery.com> 2015-12-02 Joseph Myers <joseph@codesourcery.com>
PR c/68162 PR c/68162
......
...@@ -1944,9 +1944,9 @@ cp_fold (tree x) ...@@ -1944,9 +1944,9 @@ cp_fold (tree x)
op0 = cp_fold (op0); op0 = cp_fold (op0);
if (op0 != TREE_OPERAND (x, 0)) if (op0 != TREE_OPERAND (x, 0))
x = build1_loc (loc, code, TREE_TYPE (x), op0); x = fold_build1_loc (loc, code, TREE_TYPE (x), op0);
else
x = fold (x); x = fold (x);
/* Conversion of an out-of-range value has implementation-defined /* Conversion of an out-of-range value has implementation-defined
behavior; the language considers it different from arithmetic behavior; the language considers it different from arithmetic
...@@ -1976,9 +1976,9 @@ cp_fold (tree x) ...@@ -1976,9 +1976,9 @@ cp_fold (tree x)
op0 = cp_fold (TREE_OPERAND (x, 0)); op0 = cp_fold (TREE_OPERAND (x, 0));
if (op0 != TREE_OPERAND (x, 0)) if (op0 != TREE_OPERAND (x, 0))
x = build1_loc (loc, code, TREE_TYPE (x), op0); x = fold_build1_loc (loc, code, TREE_TYPE (x), op0);
else
x = fold (x); x = fold (x);
gcc_assert (TREE_CODE (x) != COND_EXPR gcc_assert (TREE_CODE (x) != COND_EXPR
|| !VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (x, 0)))); || !VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (x, 0))));
...@@ -2048,9 +2048,9 @@ cp_fold (tree x) ...@@ -2048,9 +2048,9 @@ cp_fold (tree x)
op0 = build_empty_stmt (loc); op0 = build_empty_stmt (loc);
if (op0 != TREE_OPERAND (x, 0) || op1 != TREE_OPERAND (x, 1)) if (op0 != TREE_OPERAND (x, 0) || op1 != TREE_OPERAND (x, 1))
x = build2_loc (loc, code, TREE_TYPE (x), op0, op1); x = fold_build2_loc (loc, code, TREE_TYPE (x), op0, op1);
else
x = fold (x); x = fold (x);
if (TREE_CODE (x) == COMPOUND_EXPR && TREE_OPERAND (x, 0) == NULL_TREE if (TREE_CODE (x) == COMPOUND_EXPR && TREE_OPERAND (x, 0) == NULL_TREE
&& TREE_OPERAND (x, 1)) && TREE_OPERAND (x, 1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment