diff mbox

Fix PR47423

Message ID alpine.LNX.2.00.1101261228050.17230@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Jan. 26, 2011, 11:28 a.m. UTC
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  <rguenther@suse.de>

	PR lto/47423
	* cgraphbuild.c (record_eh_tables): Record reference to personality
	function.

Comments

H.J. Lu Jan. 27, 2011, 10:42 p.m. UTC | #1
On Wed, Jan 26, 2011 at 3:28 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> 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  <rguenther@suse.de>
>
>        PR lto/47423
>        * cgraphbuild.c (record_eh_tables): Record reference to personality
>        function.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47497
diff mbox

Patch

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;