From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7010 invoked by alias); 3 Feb 2014 18:10:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6951 invoked by uid 48); 3 Feb 2014 18:10:10 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu Date: Mon, 03 Feb 2014 18:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-checking X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg00180.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- (In reply to Martin Jambor from comment #5) > (In reply to Jakub Jelinek from comment #4) > > Created attachment 32030 [details] > > gcc49-pr60026.patch > > > > The problem is that for -O0 we don't create vdef/vuse at all, but I'd say we > > shouldn't be cloning -O0 functions either, even when they don't have noclone > > argument. Thus perhaps something like attached patch? > > While the idea of the patch is of course good, it seems that we only > set cannot_be_copied.* in copy_forbidden in tree-inline.c, so perhaps > it would be better to put the optimized test there as well so that we > never have any ordering issues? Not so easily, the problem is that copy_forbidden is called without fun being actually cfun, and set_cfun is very expensive. Do we ever call copy_forbidden on functions that haven't been rewritten into SSA form yet? If yes, it could be even set e.g. during gimplification (if (!optimize)).