Commit febfc59a by James A. Morrison

tree-convert.c (convert): Use fold_build1 instead of fold (build1.

2005-08-07  James A. Morrison  <phython@gcc.gnu.org>

        * tree-convert.c (convert): Use fold_build1 instead of
        fold (build1.

From-SVN: r102831
parent 3300bf07
2005-08-07 James A. Morrison <phython@gcc.gnu.org>
* tree-convert.c (convert): Use fold_build1 instead of
fold (build1.
2005-08-06 James A. Morrison <phython@gcc.gnu.org> 2005-08-06 James A. Morrison <phython@gcc.gnu.org>
PR treelang/23072 PR treelang/23072
......
...@@ -71,7 +71,7 @@ convert (tree type, tree expr) ...@@ -71,7 +71,7 @@ convert (tree type, tree expr)
return expr; return expr;
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr))) if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr)))
return fold (build1 (NOP_EXPR, type, expr)); return fold_build1 (NOP_EXPR, type, expr);
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK) if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node; return error_mark_node;
if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE) if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE)
...@@ -89,9 +89,9 @@ convert (tree type, tree expr) ...@@ -89,9 +89,9 @@ convert (tree type, tree expr)
/* If it returns a NOP_EXPR, we must fold it here to avoid /* If it returns a NOP_EXPR, we must fold it here to avoid
infinite recursion between fold () and convert (). */ infinite recursion between fold () and convert (). */
if (TREE_CODE (t) == NOP_EXPR) if (TREE_CODE (t) == NOP_EXPR)
return fold (build1 (NOP_EXPR, type, TREE_OPERAND (t, 0))); return fold_build1 (NOP_EXPR, type, TREE_OPERAND (t, 0));
else else
return fold (build1 (NOP_EXPR, type, t)); return fold_build1 (NOP_EXPR, type, t);
} }
if (code == POINTER_TYPE || code == REFERENCE_TYPE) if (code == POINTER_TYPE || code == REFERENCE_TYPE)
return fold (convert_to_pointer (type, e)); return fold (convert_to_pointer (type, e));
......
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