From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30920 invoked by alias); 25 Feb 2014 14:00:39 -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 30654 invoked by uid 48); 25 Feb 2014 14:00:07 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/60327] [4.9 Regression] xalanbmk and dealII ICE in ipa-inline-analysis.c:3555 Date: Tue, 25 Feb 2014 14:00: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: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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/msg02535.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60327 --- Comment #1 from Richard Biener --- The dealII ICE is Program received signal SIGSEGV, Segmentation fault. 0x00000000005c9ef7 in vec::operator[] ( this=0x0, ix=7796) at /space/rguenther/src/svn/trunk/gcc/vec.h:735 735 gcc_checking_assert (ix < m_vecpfx.m_num); (gdb) up #1 0x0000000000878d54 in inline_summary (node=0x7ffff13cbe18) at /space/rguenther/src/svn/trunk/gcc/ipa-inline.h:245 245 return &(*inline_summary_vec)[node->uid]; (gdb) p inline_summary_vec $2 = (vec *) 0x0 (gdb) p debug_cgraph_node (node) _ZN8FEValuesILi3EE6reinitERK12TriaIteratorILi3E15DoFCellAccessorILi3EEE/100039 (reinit) @0x7ffff13cbe18 Type: function definition analyzed Visibility: prevailing_def_ironly Aux: @0x7ffff1656e18 References: Referring: Read from file: fe_values.o Availability: local First run: 0 Function flags: local Called by: _ZN23DerivativeApproxim.... Calls: _ZN7MappingILi3EE16InternalDataBase16clear_first_cellEv/68568 (1.00 per call) (can throw external) Has 3 outgoing edges for indirect calls. (gdb) bt #0 0x00000000005c9ef7 in vec::operator[] ( this=0x0, ix=7796) at /space/rguenther/src/svn/trunk/gcc/vec.h:735 #1 0x0000000000878d54 in inline_summary (node=0x7ffff13cbe18) at /space/rguenther/src/svn/trunk/gcc/ipa-inline.h:245 #2 0x000000000087b0e6 in inline_update_overall_summary (node=0x7ffff13cbe18) at /space/rguenther/src/svn/trunk/gcc/ipa-inline-analysis.c:3549 #3 0x00000000008a58ae in walk_polymorphic_call_targets ( reachable_call_targets=0x24134e0, edge=0x7ffff13dd9c0, first=0x7fffffffded8, reachable=0x1be3c10, before_inlining_p=true) at /space/rguenther/src/svn/trunk/gcc/ipa.c:229 #4 0x00000000008a6e9e in symtab_remove_unreachable_nodes ( before_inlining_p=true, file=0x0) at /space/rguenther/src/svn/trunk/gcc/ipa.c:400 #5 0x0000000000996c30 in execute_todo (flags=384) at /space/rguenther/src/svn/trunk/gcc/passes.c:1896 (gdb) l 224 target->name (), target->order); 225 edge = cgraph_make_edge_direct (edge, target); 226 if (!inline_summary_vec && edge->call_stmt) 227 cgraph_redirect_edge_call_stmt_to_callee (edge); 228 else 229 inline_update_overall_summary (node); 230 } 231 } 232 } 233 (gdb) p inline_summary_vec $5 = (vec *) 0x0 (gdb) p edge->call_stmt $6 = (gimple) 0x0 not sure if the combo is not supposed to happen, but r202380 changed this like Index: ipa.c =================================================================== --- ipa.c (revision 202379) +++ ipa.c (revision 202380) @@ -220,9 +220,9 @@ walk_polymorphic_call_targets (pointer_s edge->caller->symbol.order, cgraph_node_name (target), target->symbol.order); edge = cgraph_make_edge_direct (edge, target); - if (cgraph_state != CGRAPH_STATE_IPA_SSA) + if (!inline_summary_vec && edge->call_stmt) cgraph_redirect_edge_call_stmt_to_callee (edge); - else if (inline_summary_vec) + else inline_update_overall_summary (node); } } changing it like Index: gcc/ipa.c =================================================================== --- gcc/ipa.c (revision 208124) +++ gcc/ipa.c (working copy) @@ -223,10 +223,10 @@ walk_polymorphic_call_targets (pointer_s edge->caller->order, target->name (), target->order); edge = cgraph_make_edge_direct (edge, target); - if (!inline_summary_vec && edge->call_stmt) - cgraph_redirect_edge_call_stmt_to_callee (edge); - else + if (inline_summary_vec) inline_update_overall_summary (node); + else if (edge->call_stmt) + cgraph_redirect_edge_call_stmt_to_callee (edge); } } } fixes the ICE but I'm not sure if that still effectively has the fix which was 2013-09-08 Jan Hubicka * ipa.c (walk_polymorphic_call_targets): Fix redirection before IPA summary generation.