From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111780 invoked by alias); 15 Sep 2015 07:34:04 -0000 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 Received: (qmail 111770 invoked by uid 89); 15 Sep 2015 07:34:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 15 Sep 2015 07:34:02 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 3598F2A32FCB; Tue, 15 Sep 2015 09:33:58 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BufqDNwDhS_b; Tue, 15 Sep 2015 09:33:58 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 13EAE2A32FC8; Tue, 15 Sep 2015 09:33:57 +0200 (CEST) From: Eric Botcazou To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH][20/n] Remove GENERIC stmt combining from SCCVN Date: Tue, 15 Sep 2015 07:43:00 -0000 Message-ID: <1774210.e63F4YTsBa@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: References: <2169802.F6q7hcMxNO@polaris> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2015-09/txt/msg01004.txt.bz2 > > That's old code and the comment makes it quite clear why this is done > > though. > > Yeah, but then here "we don't need to evaluate it just for the check" > applies - the check is dead code as the outer comparison is always > false. I think what the code in the Ada frontend tries to achieve > is not actually what it does. Or the testcase is invalid (or rather > dependent on optimization performed). I think that the testcase is valid (it is derived from a DEC Ada test written circa 1990). But, yes, the quoted gigi code wants to implement the famous 11.6 clause, whereby a check need not be raised if the expression is dead. The problem here is that the expression drives a conditional construct with side effects, so it cannot be considered as dead. In the end, the code indeed appears to be incorrect in resetting the flag. Instead the implementation of the 11.6 clause should rely purely on the optimizers and -fdelete-dead-exceptions. Thanks for your help to analyze this. -- Eric Botcazou