PR middle-end/51411: handle transaction_safe virtual inlined methods
Aldy Hernandez
aldyh@redhat.com
Wed Dec 14 12:58:00 GMT 2011
> Without the patch, it is ok.
> If I remove completely this part:
> if (DECL_DECLARED_INLINE_P (new_decl) && DECL_EXTERNAL (new_decl))
> {
> DECL_EXTERNAL (new_decl) = 0;
> TREE_PUBLIC (new_decl) = 0;
> }
> It ends with *only* one undefined symbol:
> src/UnitsSkins.o: In function
> `_ZGTtStltIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_':
> ./include/c++/4.7.0/bits/basic_string.h:2568: undefined reference to
> `_ZGTtNKSs7compareERKSs'
>
> $ c++filt _ZNKSs7compareERKSs
> std::basic_string<char, std::char_traits<char>, std::allocator<char>
> >::compare(std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&) const
>
> I am not sure the way to give you useful information.
This is actually good, because we were missing a testcase for the
original patch that zapped DECL_EXTERNAL and TREE_PUBLIC. Do you mind
reducing a testcase for me so we don't regress with this patch? I know
it'll be a bit challenging...
Perhaps we can try unsetting (hee hee hee) DECL_WEAK as originally
proposed. Does this fix your problem?
Index: trans-mem.c
===================================================================
--- trans-mem.c (revision 182290)
+++ trans-mem.c (working copy)
@@ -4259,6 +4259,7 @@ ipa_tm_create_version (struct cgraph_nod
{
DECL_EXTERNAL (new_decl) = 0;
TREE_PUBLIC (new_decl) = 0;
+ DECL_WEAK (new_decl) = 0;
}
tree_function_versioning (old_decl, new_decl, NULL, false, NULL,
More information about the Gcc-patches
mailing list