From patchwork Mon Feb 9 20:32:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 438077 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 725901400A0 for ; Tue, 10 Feb 2015 07:34:20 +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:subject:message-id:mime-version:content-type; q=dns; s= default; b=Mt+/5bfiCXylKVv6S8Iy6gVRxiyu3MutCl1Nh+Gc+FsEexTqsDtm7 G/2bE1RU66jvj1yeYms1CDYVdLP3b2qJM5VN3XJP+bR+cvcZEhsj1+2zBDh4p5ax tGlWpFeRDOjVeuTQaP9Jx0EjImYwY+w9Mjo41GoGS1y7nljtkzlWnA= 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:subject:message-id:mime-version:content-type; s= default; bh=mGPFzGV1+m5msC2ieSnYhOEv25k=; b=w/qqoPN/KghCuEeN/VX9 sUKSzkwGUzG3TMw0BsF03QA8rBPt5y0O0xGbxpBxkaPdrnVuGG4htYvEQVK05byu EjRmJ1axnn59aYwZ4PxEaGtJMP0ir3PV+BocphnbWofGzmP/0w99Tq6IB/vQ0whs wl6IE9qe7i/UIkThhDCn+uo= Received: (qmail 21397 invoked by alias); 9 Feb 2015 20:32:32 -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 21372 invoked by uid 89); 9 Feb 2015 20:32:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 09 Feb 2015 20:32:29 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id DE0D15430DA; Mon, 9 Feb 2015 21:32:24 +0100 (CET) Date: Mon, 9 Feb 2015 21:32:24 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix ipa-polymorphic-call ICE Message-ID: <20150209203224.GD25969@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, this patch fixes ICE seen when compiling firefox with large unit growths. The problem is that the speculative part of analysis trips over VOID pointer and gets lost. Bootstrapped/regtsted x86_64-linux, commited. * ipa-polymorphic-call.c (ipa_polymorphic_call_context): Avoid ICE on getting VOID pointer. Index: ipa-polymorphic-call.c =================================================================== --- ipa-polymorphic-call.c (revision 220509) +++ ipa-polymorphic-call.c (working copy) @@ -1078,7 +1078,7 @@ ipa_polymorphic_call_context::ipa_polymo base_type = TREE_TYPE (gimple_assign_rhs1 (SSA_NAME_DEF_STMT (base_pointer))); - if (POINTER_TYPE_P (base_type)) + if (base_type && POINTER_TYPE_P (base_type)) combine_speculation_with (TYPE_MAIN_VARIANT (TREE_TYPE (base_type)), offset, true, NULL /* Do not change type here */);