This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Call fold_build1 in treelang
- From: ja2morri at csclub dot uwaterloo dot ca (James A. Morrison)
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 07 Aug 2005 12:37:52 -0400
- Subject: [committed] Call fold_build1 in treelang
Hi,
This patch fixes the last couple fold (build calls I found in treelang.
Bootstrapped and regtested on ia64-linux.
--
Thanks,
Jim
http://www.csclub.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim
2005-08-07 James A. Morrison <phython@gcc.gnu.org>
* tree-convert.c (convert): Use fold_build1 instead of
fold (build1.
Index: tree-convert.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/treelang/tree-convert.c,v
retrieving revision 1.4
diff -u -p -r1.4 tree-convert.c
--- tree-convert.c 25 Jun 2005 00:59:41 -0000 1.4
+++ tree-convert.c 7 Aug 2005 16:32:48 -0000
@@ -71,7 +71,7 @@ convert (tree type, tree expr)
return 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)
return error_mark_node;
if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE)
@@ -89,9 +89,9 @@ convert (tree type, tree expr)
/* If it returns a NOP_EXPR, we must fold it here to avoid
infinite recursion between fold () and convert (). */
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
- return fold (build1 (NOP_EXPR, type, t));
+ return fold_build1 (NOP_EXPR, type, t);
}
if (code == POINTER_TYPE || code == REFERENCE_TYPE)
return fold (convert_to_pointer (type, e));