aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1995-05-24 19:41:29 +0000
committerJason Merrill <merrill@gnu.org>1995-05-24 19:41:29 +0000
commit1180eb10426d15d188cdfca38495035f48b1dfd2 (patch)
treebf1c85d5ee5b72959850ebb2664cd0b80aa8cec4 /gcc/fold-const.c
parent103894f1182df9a5f64cbb8f6d56397b9e7de0d8 (diff)
downloadgcc-1180eb10426d15d188cdfca38495035f48b1dfd2.zip
gcc-1180eb10426d15d188cdfca38495035f48b1dfd2.tar.gz
gcc-1180eb10426d15d188cdfca38495035f48b1dfd2.tar.bz2
*** empty log message ***
From-SVN: r9801
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index e3470b3..e95a2c8 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -4201,7 +4201,11 @@ fold (expr)
and its values must be 0 or 1.
("true" is a fixed value perhaps depending on the language,
but we don't handle values other than 1 correctly yet.) */
- return invert_truthvalue (arg0);
+ tem = invert_truthvalue (arg0);
+ /* Avoid infinite recursion. */
+ if (TREE_CODE (tem) == TRUTH_NOT_EXPR)
+ return t;
+ return convert (type, tem);
case TRUTH_ANDIF_EXPR:
/* Note that the operands of this must be ints