> 2013-05-08 Nathan Sidwell <nat...@codesourcery.com> > > gcc/ > * varasm.c (default_use_anchors_for_symbol_p): Reject WEAK. > > gcc/testsuite/ > * gcc.dg/visibility-21.c: New. > > Index: gcc/varasm.c > =================================================================== > --- gcc/varasm.c (revision 410150) > +++ gcc/varasm.c (working copy) > @@ -6871,6 +6871,11 @@ default_use_anchors_for_symbol_p (const_ > if (!targetm.binds_local_p (decl)) > return false; > > + /* Weak decls might be overridden, but could still be local to > + the module. */ > + if (DECL_WEAK (decl)) > + return false;
With LTO we play more of similar tricks, by making use of the resolution file. I.e. for COMMON and EXTERNAL. Does it matter here? I would preffer the renaming excercise, since the name confused me few times, too and the other predicate would be useful for IPA code :) Thanks a lot for looking into this! Honza