cgraphbuild.c (record_eh_tables): Mark personality function as having address taken.
authorJan Hubicka <jh@suse.cz>
Thu, 9 Jun 2011 23:39:54 +0000 (01:39 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 9 Jun 2011 23:39:54 +0000 (23:39 +0000)
* cgraphbuild.c (record_eh_tables): Mark personality function as having
address taken.

From-SVN: r174869

gcc/ChangeLog
gcc/cgraphbuild.c

index cd42b1afa33c97147832c5ab1b65132fff66473b..fad5c9d072e369b53bae068cdebcbb109d68e19c 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-09  Jan Hubicka  <jh@suse.cz>
+
+       * cgraphbuild.c (record_eh_tables): Mark personality function as having
+       address taken.
+
 2011-06-10  Hans-Peter Nilsson  <hp@axis.com>
 
        PR rtl-optimization/49154
index eb9da7fc16c38b31ab940bcf891ddd4647457522..961804b415e04d312c8fcbc1e1e206d1b161c692 100644 (file)
@@ -149,9 +149,13 @@ record_eh_tables (struct cgraph_node *node, struct function *fun)
   eh_region i;
 
   if (DECL_FUNCTION_PERSONALITY (node->decl))
-    ipa_record_reference (node, NULL,
-              cgraph_get_create_node (DECL_FUNCTION_PERSONALITY (node->decl)),
-              NULL, IPA_REF_ADDR, NULL);
+    {
+      struct cgraph_node *per_node;
+
+      per_node = cgraph_get_create_node (DECL_FUNCTION_PERSONALITY (node->decl));
+      ipa_record_reference (node, NULL, per_node, NULL, IPA_REF_ADDR, NULL);
+      cgraph_mark_address_taken_node (per_node);
+    }
 
   i = fun->eh->region_tree;
   if (!i)