OSDN Git Service

* fold-const.c (fold): Treat MAX_EXPR and MIN_EXPR like
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Feb 2004 18:15:52 +0000 (18:15 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Feb 2004 18:15:52 +0000 (18:15 +0000)
comparisons with regard to signedness.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78441 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index 8f405e7..ae38659 100644 (file)
@@ -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.
index eaefe02..2b2e874 100644 (file)
@@ -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.  */