From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19143 invoked by alias); 8 Jan 2013 14:25:24 -0000 Received: (qmail 18795 invoked by uid 48); 8 Jan 2013 14:25:01 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/55797] [4.8 Regression] ICE: verify_cgraph_node failed: edge has no corresponding call_stmt Date: Tue, 08 Jan 2013 14:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2013-01/txt/msg00653.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55797 --- Comment #4 from Richard Biener 2013-01-08 14:24:59 UTC --- Solution to put off recursive inlining through iteration: Index: ipa-inline.c =================================================================== --- ipa-inline.c (revision 195014) +++ ipa-inline.c (working copy) @@ -1951,7 +1951,9 @@ early_inline_small_functions (struct cgr if (!can_early_inline_edge_p (e)) continue; - if (cgraph_edge_recursive_p (e)) + if (cgraph_edge_recursive_p (e) + || !DECL_STRUCT_FUNCTION + (callee->symbol.decl)->always_inline_functions_inlined) { if (dump_file) fprintf (dump_file, " Not inlining: recursive call.\n"); as we process functions in DFS order any not already processed function is in a callgraph cycle. This doesn't fix the overzealeous inlining via the iteration for the testcase though as we still grow in calls quadratically (we never hit a direct recursive call when inlining the recursive sub-callgraph). That is, early inlining completely misses the graph topology hints (never inline a SCC entry edge, etc.)