From patchwork Fri Dec 12 08:47:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 420387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BE08140081 for ; Fri, 12 Dec 2014 19:48:02 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=ratCCFQyvHh6n50sD WL0PRArvmzVFSAYVVBBPyPZd433A8a9Llm7erzGZ2xK3dClGwHsHQd/l+T65zRoI OBpf4KJjCPKmYVN0LecTdBIgkTheWvFxOB9S0i6GQbMkrI3zPeBqGT0DwGjLHlZI XuQeogo2P9wP/Nxhq3IitEhjaI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=+AzQ/LHPM6sP7foW77ihhIX wrZI=; b=E0pKx3/sqWlUoIt0LE4oS4RKyRQEjZKKU8YnQmVinJ+ZonAdoLx+5rd qHmMzUpeLZZq9XKQogxGB4PnYY/qUoJvn7aCfPXpeoJSj8mBWLV5OHd2FVcWvrhu rUCEt8uRD4Ws6KVzaOSjEqp6PTmqpu/Ue9otYaXUW/LWKEr3Xqr8= Received: (qmail 24396 invoked by alias); 12 Dec 2014 08:47:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24372 invoked by uid 89); 12 Dec 2014 08:47:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: atrey.karlin.mff.cuni.cz Received: from atrey.karlin.mff.cuni.cz (HELO atrey.karlin.mff.cuni.cz) (195.113.26.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Dec 2014 08:47:51 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 4018) id D8A7781D3E; Fri, 12 Dec 2014 09:47:48 +0100 (CET) Date: Fri, 12 Dec 2014 09:47:48 +0100 From: Jan Hubicka To: Andreas Schwab Cc: hubicka@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: r218609 - in /trunk/gcc: ChangeLog common.opt d... Message-ID: <20141212084748.GA14645@atrey.karlin.mff.cuni.cz> References: <20141210211728.19676.qmail@sourceware.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes > hubicka@gcc.gnu.org writes: > > > Author: hubicka > > Date: Wed Dec 10 21:17:28 2014 > > New Revision: 218609 > > > > URL: https://gcc.gnu.org/viewcvs?rev=218609&root=gcc&view=rev > > Log: > > * doc/invoke.texi: (-devirtualize-at-ltrans): Document. > > * lto-cgraph.c (lto_output_varpool_node): Mark initializer as removed > > when it is not streamed to the given ltrans. > > (compute_ltrans_boundary): Make code adding all polymorphic > > call targets conditional with !flag_wpa || flag_ltrans_devirtualize. > > * common.opt (fdevirtualize-at-ltrans): New flag. > > /usr/local/gcc/gcc-20141211/gcc/testsuite/g++.dg/ipa/pr64059.C:56:1: internal compiler error: Segmentation fault. > 0x4000000000df742f crash_signal. > ../../gcc/toplev.c:358. > 0x40000000012f2c9f get_binfo_at_offset(tree_node*, long, tree_node*). > ../../gcc/tree.c:11922. > 0x4000000000a0d75f possible_polymorphic_call_targets(tree_node*, long, ipa_polymorphic_call_context, bool*, void**, bool). > ../../gcc/ipa-devirt.c:2404. > 0x4000000000b6f2ef possible_polymorphic_call_targets(cgraph_edge*, bool*, void**, bool). > ../../gcc/ipa-utils.h:109. > 0x4000000000b6f2ef compute_ltrans_boundary(lto_symtab_encoder_d*). > ../../gcc/lto-cgraph.c:952. > 0x4000000000c40f2f ipa_write_summaries(bool). > ../../gcc/passes.c:2511. > 0x40000000006584ff ipa_passes. > ../../gcc/cgraphunit.c:2091. > 0x40000000006584ff symbol_table::compile(). > ../../gcc/cgraphunit.c:2187. > 0x400000000065be1f symbol_table::finalize_compilation_unit(). > ../../gcc/cgraphunit.c:2340. > 0x400000000029bcef cp_write_global_declarations(). > ../../gcc/cp/decl2.c:4688. > Please submit a full bug report,. > with preprocessed source if appropriate.. > Please include the complete backtrace with any bug report.. > See for instructions.. > > FAIL: g++.dg/ipa/pr64059.C -std=gnu++11 (internal compiler error) The problem here is that BINFO is not streamed because devirt is disabled. I have commited the following patch (that I have in my local tree for some time) Honza Index: ChangeLog =================================================================== --- ChangeLog (revision 218658) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2014-12-12 Jan Hubicka + + * ipa-devirt.c (possible_polymorphic_call_targets): Return early + if otr_type has no BINFO. + 2014-12-12 Zhenqiang Chen PR rtl-optimization/63917 Index: ipa-devirt.c =================================================================== --- ipa-devirt.c (revision 218639) +++ ipa-devirt.c (working copy) @@ -2239,7 +2239,7 @@ possible_polymorphic_call_targets (tree /* If ODR is not initialized or the constext is invalid, return empty incomplete list. */ - if (!odr_hash || context.invalid) + if (!odr_hash || context.invalid || !TYPE_BINFO (otr_type)) { if (completep) *completep = context.invalid;