From 5dfa45d043db04ebddf4081364661e0784304d39 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 28 Jul 2003 17:42:24 +0200 Subject: configure.in (--enable-checking): Add fold category. * configure.in (--enable-checking): Add fold category. (ENABLE_FOLD_CHECKING): Define if requested. * configure: Rebuilt. * config.in: Rebuilt. * doc/install.texi: Document it. * fold-const.c: Include md5.h. [ENABLE_FOLD_CHECKING] (fold): Define to fold_1. [ENABLE_FOLD_CHECKING] (fold, fold_checksum_tree, fold_check_failed, print_fold_checksum): New functions. * fold-const.c (fold): Never modify argument passed to fold, instead change a copy and return it. * convert.c (convert_to_integer): Likewise. testsuite/ * gcc.c-torture/compile/20030725-1.c: New test. From-SVN: r69886 --- gcc/convert.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/convert.c') diff --git a/gcc/convert.c b/gcc/convert.c index fc001b6..5bab1c1 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -320,6 +320,7 @@ convert_to_integer (tree type, tree expr) if (TREE_CODE_CLASS (ex_form) == '<') { + expr = copy_node (expr); TREE_TYPE (expr) = type; return expr; } @@ -328,6 +329,7 @@ convert_to_integer (tree type, tree expr) || ex_form == TRUTH_OR_EXPR || ex_form == TRUTH_ORIF_EXPR || ex_form == TRUTH_XOR_EXPR) { + expr = copy_node (expr); TREE_OPERAND (expr, 0) = convert (type, TREE_OPERAND (expr, 0)); TREE_OPERAND (expr, 1) = convert (type, TREE_OPERAND (expr, 1)); TREE_TYPE (expr) = type; @@ -336,6 +338,7 @@ convert_to_integer (tree type, tree expr) else if (ex_form == TRUTH_NOT_EXPR) { + expr = copy_node (expr); TREE_OPERAND (expr, 0) = convert (type, TREE_OPERAND (expr, 0)); TREE_TYPE (expr) = type; return expr; -- cgit v1.1