From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16021 invoked by alias); 3 Apr 2003 14:18:55 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16014 invoked from network); 3 Apr 2003 14:18:54 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 3 Apr 2003 14:18:54 -0000 Received: from tornado.toronto.redhat.com (IDENT:aKey8a7FVH3rMvCB1HSora1WAo/VZed/@tornado.toronto.redhat.com [172.16.14.228]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h33EImu13900; Thu, 3 Apr 2003 09:18:48 -0500 Received: from tornado.toronto.redhat.com (localhost [127.0.0.1]) by tornado.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id h33EIlvE031159; Thu, 3 Apr 2003 09:18:47 -0500 Received: (from dnovillo@localhost) by tornado.toronto.redhat.com (8.12.8/8.12.5/Submit) id h33EIkBk031157; Thu, 3 Apr 2003 09:18:46 -0500 Date: Thu, 03 Apr 2003 16:27:00 -0000 From: Diego Novillo To: Eyal Lebedinsky Cc: gcc@gcc.gnu.org Subject: Re: tree-ssa bug? Message-ID: <20030403141846.GA31127@tornado.toronto.redhat.com> References: <3E8C28D6.7DD9AC72@eyal.emu.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <3E8C28D6.7DD9AC72@eyal.emu.id.au> User-Agent: Mutt/1.4i Organization: Red Hat Canada X-SW-Source: 2003-04/txt/msg00143.txt.bz2 On Thu, 03 Apr 2003, Eyal Lebedinsky wrote: > Built off CVS branch tree-ssa-20020619-branch. > Linux 2.4, i386 > > OK, here is another very strange result, took me a bit of time to track > this one down. > Good catch. This was an omission in the new non destructive folders. When folding comparisons with signed_max+1 we were always replacing the comparison with >=. Diego. * fold-const.c (fold_relational_hi_lo): Add missing comparison when folding comparisons to signed_max+1. Index: fold-const.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v retrieving revision 1.213.2.25 diff -d -u -p -r1.213.2.25 fold-const.c --- fold-const.c 27 Feb 2003 18:30:02 -0000 1.213.2.25 +++ fold-const.c 3 Apr 2003 14:14:41 -0000 @@ -4983,7 +4983,7 @@ fold_relational_hi_lo (code_p, type_p, o st0 = (*lang_hooks.types.signed_type) (TREE_TYPE (op0)); st1 = (*lang_hooks.types.signed_type) (TREE_TYPE (op1)); - exp = build (LE_EXPR ? GE_EXPR: LT_EXPR, + exp = build (code == LE_EXPR ? GE_EXPR: LT_EXPR, type, convert (st0, op0), convert (st1, integer_zero_node));