------- Comment #4 from pinskia at gcc dot gnu dot org 2008-08-31 02:00 ------- Simple patch which fixes the DECL_WEAK issue (I think). Index: cgraphunit.c =================================================================== --- cgraphunit.c (revision 139811) +++ cgraphunit.c (working copy) @@ -1532,13 +1532,15 @@ cgraph_function_versioning (struct cgrap update_call_expr (new_version_node);
/* Update the new version's properties. - Make The new version visible only within this translation unit. + Make The new version visible only within this translation unit. Make sure + that is not weak also. ??? We cannot use COMDAT linkage because there is no ABI support for this. */ DECL_EXTERNAL (new_version_node->decl) = 0; DECL_ONE_ONLY (new_version_node->decl) = 0; TREE_PUBLIC (new_version_node->decl) = 0; DECL_COMDAT (new_version_node->decl) = 0; + DECL_WEAK (new_version_node->decl) = 0; new_version_node->local.externally_visible = 0; new_version_node->local.local = 1; new_version_node->lowered = true; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37293