From: Eric Botcazou Date: Wed, 25 Feb 2004 18:15:52 +0000 (+0100) Subject: fold-const.c (fold): Treat MAX_EXPR and MIN_EXPR like comparisons with regard to... X-Git-Tag: releases/gcc-4.0.0~9858 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81fbecace5525cf0cb6d938652cfb997ddaab741;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f405e757874..ae3865987895 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-25 Eric Botcazou + + * fold-const.c (fold): Treat MAX_EXPR and MIN_EXPR like + comparisons with regard to signedness. + 2004-02-25 Richard Earnshaw * arm.c (thumb_legitimize_address): New function. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index eaefe0200050..2b2e874062bd 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. */