From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3698 invoked by alias); 8 Aug 2010 08:44:23 -0000 Received: (qmail 3687 invoked by uid 22791); 8 Aug 2010 08:44:22 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 Aug 2010 08:44:17 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 9AA438655F; Sun, 8 Aug 2010 10:44:15 +0200 (CEST) Date: Sun, 08 Aug 2010 08:44:00 -0000 From: Richard Guenther To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, Arnaud Charlet Subject: Re: [PATCH] Keep lattice abstract in the SSA propagator, substitue lattice values at defs In-Reply-To: <201008081000.41310.ebotcazou@adacore.com> Message-ID: References: <20100804123142.GA83420@adacore.com> <201008081000.41310.ebotcazou@adacore.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 2010-08/txt/msg00584.txt.bz2 On Sun, 8 Aug 2010, Eric Botcazou wrote: > > D.2544_253 = prephitmp.53_302 + 2147483647; > > D.2553_254 = (size_type) D.2544_253; > > The signed integer overflow is introduced during the reassoc1 pass. For the > attached reduced testcase, we start from: > > : > D.2615_217 = L43b_216 + -1; > iftmp.30_218 = D.2615_217 + -2147483648; > D.2624_225 = (size_type) iftmp.30_218; > > and we go to: > > : > iftmp.30_218 = L43b_216 + 2147483647; > D.2624_225 = (size_type) iftmp.30_218; Well, I remember a similar kind of problem fixed in fold - basically you can't re-associate (a + b) + c to a + (b + c) with signed arithmetic. But - we can do so if reassociating constants only as in the example above. Because if (L43b_216 - 1) - 2147483648 doesn't overflow then L43b_216 + 2147483647 doesn't either. So I believe this specific problem pre-exists before re-assoc. Richard.