------- Comment #6 from howarth at nitro dot med dot uc dot edu 2010-02-11 02:04 ------- This section in darwin.c seems a bit strange...
if (!DECL_EXTERNAL (decl) && (!TREE_PUBLIC (decl) || !DECL_WEAK (decl)) && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)) && ((TREE_STATIC (decl) && (!DECL_COMMON (decl) || !TREE_PUBLIC (decl))) || (!DECL_COMMON (decl) && DECL_INITIAL (decl) && DECL_INITIAL (decl) != error_mark_node))) SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_DEFINED; Since they already test against... !DECL_WEAK (decl)) , I wonder if it might also need to test against... ! lookup_attribute ("weak", DECL_ATTRIBUTES (decl)) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42854