From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18750 invoked by alias); 4 Aug 2010 12:58:00 -0000 Received: (qmail 18740 invoked by uid 22791); 4 Aug 2010 12:57:59 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Aug 2010 12:57:53 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id A0D2F93717; Wed, 4 Aug 2010 14:57:50 +0200 (CEST) Date: Wed, 04 Aug 2010 12:58:00 -0000 From: Richard Guenther To: Arnaud Charlet Cc: gcc-patches@gcc.gnu.org, Eric Botcazou Subject: Re: [PATCH] Keep lattice abstract in the SSA propagator, substitue lattice values at defs In-Reply-To: Message-ID: References: <20100804122648.GA82722@adacore.com> <20100804123142.GA83420@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/msg00273.txt.bz2 On Wed, 4 Aug 2010, Richard Guenther wrote: > On Wed, 4 Aug 2010, Arnaud Charlet wrote: > > > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu. c52102b > > > > > and c52102d now fail, because they rely on undefined signed integer > > > > > overflow. > > > > > > > > Ada ACATS tests do not rely on signed integer overflow: Ada has built-in > > > > overflow checks as part of the language, but this capability requires the > > > > -gnato switch. > > > > > > > > If these tests are failing, it means the -gnato switch is missing on these > > > > tests. > > > > > > > > Can you please fix that by updating > > > > gcc/testsuite/ada/acats/overflow.lst ? > > > > Thanks in advance. > > > > > > Adding -gnato doesn't fix the testcases (checked c52102b). > > > > Well, then there's something fishy here that needs to be investigated, can you > > expand on why these tests "rely on undefined signed integer overflow" ? > > I looked at the VRP dump and it derives perfectly valid assumptions. > From > > and ident_int_1_10 is [1, 4]> > > : > D.2465_155 = ident_int_2_12 + 1; > L27b_156 = D.2465_155 - ident_int_1_10; > L29b_159 = L27b_156 + 1; > > : > # L29b_363 = PHI > ... > > and we arrive with [-3, 9] for prephitmp.53_302 and [-1, 5] for L29b_363 > > if (prephitmp.53_302 > L29b_363) > goto ; > > : > > thus we can conclude that prephitmp.53_302 is [0, 9] here. > The following statement then produces a range of [2147483647, overflow]. > So we happily substitute a constant value of 2147483647 for D.2544_253. > > D.2544_253 = prephitmp.53_302 + 2147483647; > D.2553_254 = (size_type) D.2544_253; > ... > D.2554_257 = D.2553_254 + 1; Btw, is it really necessary to use INT_MIN as minimum index value for arrays? typedef character c52102b__B_2__T40b[-2147483647:(integer) L29b > 1 ? (size_type) (((integer) L29b + -1) + -2147483648) : -2147483648]; S38b[-2147483647 ...]{lb: -2147483648 sz: 1} = ... not that it is invalid, but the above situation might be triggered by this. Richard.