From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19555 invoked by alias); 12 Oct 2007 12:49:40 -0000 Received: (qmail 19544 invoked by uid 22791); 12 Oct 2007 12:49:39 -0000 X-Spam-Check-By: sourceware.org Received: from qb-out-0506.google.com (HELO qb-out-0506.google.com) (72.14.204.238) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 12 Oct 2007 12:49:34 +0000 Received: by qb-out-0506.google.com with SMTP id p30so854487qba for ; Fri, 12 Oct 2007 05:49:32 -0700 (PDT) Received: by 10.65.96.6 with SMTP id y6mr6420005qbl.1192193372698; Fri, 12 Oct 2007 05:49:32 -0700 (PDT) Received: by 10.65.203.7 with HTTP; Fri, 12 Oct 2007 05:49:32 -0700 (PDT) Message-ID: <84fc9c000710120549v6a5bead5ob2cbf21c904d0b74@mail.gmail.com> Date: Fri, 12 Oct 2007 12:49:00 -0000 From: "Richard Guenther" To: "Richard Kenner" Subject: Re: [PATCH] Fix optimization regression in constant folder Cc: ebotcazou@adacore.com, gcc-patches@gcc.gnu.org, iant@google.com, mark@codesourcery.com, matz@suse.de In-Reply-To: <10710121248.AA11297@vlsi1.ultra.nyu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200709171539.26653.ebotcazou@adacore.com> <10710111536.AA24058@vlsi1.ultra.nyu.edu> <10710111621.AA25372@vlsi1.ultra.nyu.edu> <10710111701.AA26308@vlsi1.ultra.nyu.edu> <10710111759.AA26875@vlsi1.ultra.nyu.edu> <84fc9c000710120120h3c4f4335ud982165bc8d2c1a1@mail.gmail.com> <10710121248.AA11297@vlsi1.ultra.nyu.edu> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg00725.txt.bz2 On 10/12/07, Richard Kenner wrote: > > We do that all the time now with POINTER_PLUS_EXPR which takes an > > unsigned sizetype as its offset parameter. There is nothing bad about this. > > It's one thing if we have an expression with an offset that just MIGHT > be negative, but quite another to do so with an expression that we KNOW > will be negative, in my opinion. Does the spec of POINTER_PLUS_EXPR really > require that its offset parameter be an unsigned type? It should be > any sizetype. It requires that it is exactly 'sizetype'. Which makes it signed for Ada again. Richard.