summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@act-europe.fr>2004-02-25 19:15:52 +0100
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-02-25 18:15:52 +0000
commit81fbecace5525cf0cb6d938652cfb997ddaab741 (patch)
tree5f25edf871f3b8f29f4073b811ac08e06283a01b /gcc
parent2495e20b5d855d6d8679ba0f98758b0d7053ffdd (diff)
downloadgcc-81fbecace5525cf0cb6d938652cfb997ddaab741.tar.gz
fold-const.c (fold): Treat MAX_EXPR and MIN_EXPR like comparisons with regard to signedness.
* fold-const.c (fold): Treat MAX_EXPR and MIN_EXPR like comparisons with regard to signedness. From-SVN: r78441
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/fold-const.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8f405e75787..ae386598789 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-25 Eric Botcazou <ebotcazou@act-europe.fr>
+
+ * fold-const.c (fold): Treat MAX_EXPR and MIN_EXPR like
+ comparisons with regard to signedness.
+
2004-02-25 Richard Earnshaw <rearnsha@arm.com>
* arm.c (thumb_legitimize_address): New function.
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index eaefe020005..2b2e874062b 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -5423,7 +5423,10 @@ fold (tree expr)
if (op == 0)
continue; /* Valid for CALL_EXPR, at least. */
- if (kind == '<' || code == RSHIFT_EXPR)
+ if (kind == '<'
+ || code == MAX_EXPR
+ || code == MIN_EXPR
+ || code == RSHIFT_EXPR)
{
/* Signedness matters here. Perhaps we can refine this
later. */