From patchwork Wed Jan 26 11:28:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 80500 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]) by ozlabs.org (Postfix) with SMTP id 9C39BB70EE for ; Wed, 26 Jan 2011 22:29:06 +1100 (EST) Received: (qmail 6320 invoked by alias); 26 Jan 2011 11:29:05 -0000 Received: (qmail 6312 invoked by uid 22791); 26 Jan 2011 11:29:03 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD 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; Wed, 26 Jan 2011 11:28:58 +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 A693294109 for ; Wed, 26 Jan 2011 12:28:55 +0100 (CET) Date: Wed, 26 Jan 2011 12:28:55 +0100 (CET) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR47423 Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 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 This makes us properly record the reference to the personality function and thus avoids pass-through for libsubc++ and LTO. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-01-26 Richard Guenther PR lto/47423 * cgraphbuild.c (record_eh_tables): Record reference to personality function. Index: gcc/cgraphbuild.c =================================================================== --- gcc/cgraphbuild.c (revision 169283) +++ gcc/cgraphbuild.c (working copy) @@ -141,6 +141,11 @@ record_eh_tables (struct cgraph_node *no { eh_region i; + if (DECL_FUNCTION_PERSONALITY (node->decl)) + ipa_record_reference (node, NULL, + cgraph_node (DECL_FUNCTION_PERSONALITY (node->decl)), + NULL, IPA_REF_ADDR, NULL); + i = fun->eh->region_tree; if (!i) return;