From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12482 invoked by alias); 18 Dec 2012 17:16:32 -0000 Received: (qmail 12103 invoked by uid 48); 18 Dec 2012 17:16:01 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55683] [4.8 Regression] ICE in inline_call, at ipa-inline-transform.c:270 Date: Tue, 18 Dec 2012 17:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 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: 2012-12/txt/msg01796.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55683 --- Comment #11 from Jan Hubicka 2012-12-18 17:15:51 UTC --- Created attachment 29001 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29001 proposed patch OK, we know the argument is constant unit size align 64 symtab 0 alias set 4 canonical type 0x7ffff7560f18 fields context full-name "struct C" needs-constructor X() X(constX&) this=(X&) n_parents=0 use_template=0 interface-unknown pointer_to_this chain > public unsigned DI size unit size align 64 symtab 0 alias set -1 canonical type 0x7ffff75741f8> constant arg 0 addressable used static tree_1 tree_3 decl_5 decl_6 BLK file t.C line 25 col 12 size unit size align 128 context >> ipa_get_indirect_edge_target used when we estimate effect of inlining goes into path looking up the binfo based on constant if (TREE_CODE (t) != TREE_BINFO) { tree binfo; binfo = gimple_extract_devirt_binfo_from_cst (t); if (!binfo) return NULL_TREE; binfo = get_binfo_at_offset (binfo, anc_offset, otr_type); if (!binfo) return NULL_TREE; return gimple_get_virt_method_for_binfo (token, binfo); } this code is missing in try_make_edge_direct_virtual_call that is actually responsible for devirtualizing. I am testing the attached patch. If I read this right, we should get the problem every time we devirtualize based on static object. I am surprised this do not trigger in testsuite/bootstrap. Honza