From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109162 invoked by alias); 21 Dec 2015 14:19:51 -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 109149 invoked by uid 89); 21 Dec 2015 14:19:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=out!, ltosymtab, lto-symtab, conclude X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 21 Dec 2015 14:19:48 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 08F0A542431; Mon, 21 Dec 2015 15:19:44 +0100 (CET) Date: Mon, 21 Dec 2015 14:19:00 -0000 From: Jan Hubicka To: Eric Botcazou Cc: Jan Hubicka , gcc-patches@gcc.gnu.org, "H.J. Lu" , Richard Biener , Arnaud Charlet Subject: Re: Fix lto-symtab ICE during Ada LTO bootstrap Message-ID: <20151221141944.GB10803@kam.mff.cuni.cz> References: <20151121182122.GB23225@kam.mff.cuni.cz> <20151123183655.GB77967@kam.mff.cuni.cz> <5296555.IcPf3kD4Th@polaris> <3448714.nhJ8om10cS@polaris> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3448714.nhJ8om10cS@polaris> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-12/txt/msg01983.txt.bz2 Hi, the change in my patch was intentional, I forgot to send the email. Sorry for that. The reason is that labels/predictions/debug statements now go specially though DCE and are marked as neecessary, but not really handled so (i.e. we can remove conditional controlling only debug statements). This can cause an infinite loop. > > It's apparently another bug in the DCE pass. > > But it comes from a stalled ABNORMAL flag after the FRE3 pass so: I suppose the CFG verifier should also catch this. I wonder how this can lead to wrong code as opossed to infinite loop? I can imagine DCE being confused about non-control-flow stmt and conclude the abnormal path as the path leaving the loop. I will look into the testcase more. Thanks for working this out! Honza > > Index: tree-ssa-pre.c > =================================================================== > --- tree-ssa-pre.c (revision 231856) > +++ tree-ssa-pre.c (working copy) > @@ -4128,6 +4128,14 @@ eliminate_dom_walker::before_dom_childre > print_gimple_stmt (dump_file, stmt, 0, 0); > } > > + if (is_gimple_call (stmt) > + && stmt_can_make_abnormal_goto (stmt)) > + { > + bitmap_set_bit (need_ab_cleanup, gimple_bb (stmt)- > >index); > + if (dump_file && (dump_flags & TDF_DETAILS)) > + fprintf (dump_file, " Removed AB side-effects.\n"); > + } > + > pre_stats.eliminations++; > continue; > } > > is apparently sufficient. Testing... > > -- > Eric Botcazou