From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14388 invoked by alias); 14 Jun 2011 20:51:21 -0000 Received: (qmail 14380 invoked by uid 22791); 14 Jun 2011 20:51:20 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Jun 2011 20:51:05 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 3706374609; Tue, 14 Jun 2011 22:51:04 +0200 (CEST) Date: Tue, 14 Jun 2011 20:53:00 -0000 From: Martin Jambor To: GCC Patches Cc: Jan Hubicka Subject: [PATCH, PR 48613] Don't stream jump functions if there are none Message-ID: <20110614205103.GB30874@virgil.arch.suse.de> Mail-Followup-To: GCC Patches , Jan Hubicka MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg01110.txt.bz2 Hi, the patch below fixes PR 48613 which is an ICE with -O0 -findirect-inlining. Rather than adding "&& optimize" here and there, at this place we can easily see whether there is something to do or not by testing ipa_node_params_vector for NULL. And the flag-triggering combinations can -and are - dealt elsewhere. Bootstrapped and tested on trunk on x86_64-linux. OK for trunk and subsequently for the 4.6 branch too? Thanks, Martin 2011-06-13 Martin Jambor PR tree-optimization/48613 * ipa-prop.c (ipa_prop_write_jump_functions): Return immediately if ipa_node_params_vector is NULL. Index: src/gcc/ipa-prop.c =================================================================== --- src.orig/gcc/ipa-prop.c +++ src/gcc/ipa-prop.c @@ -2900,12 +2900,15 @@ void ipa_prop_write_jump_functions (cgraph_node_set set) { struct cgraph_node *node; - struct output_block *ob = create_output_block (LTO_section_jump_functions); + struct output_block *ob; unsigned int count = 0; cgraph_node_set_iterator csi; - ob->cgraph_node = NULL; + if (!ipa_node_params_vector) + return; + ob = create_output_block (LTO_section_jump_functions); + ob->cgraph_node = NULL; for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi)) { node = csi_node (csi);