Hi,
there is bug in record_eh_tables that fires in one of C++ testcases where
personality function is present in the same unit and GCC happily optimizes it
out because it fails to set address_taken flag.
Bootstrapped/regtested x86_64-linux, will commit it shortly.
* cgraphbuild.c (record_eh_tables): Mark personality function as having
address taken.
Index: cgraphbuild.c
===================================================================
--- cgraphbuild.c (revision 174804)
+++ cgraphbuild.c (working copy)
@@ -149,9 +149,13 @@ record_eh_tables (struct cgraph_node *no
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)