------- Comment #5 from hhinnant at apple dot com 2006-06-13 21:23 -------
(In reply to comment #4)
> For Darwin we do not want explicit instantiations to be
> linkonce. */
>
>
> This is why this testcase fails on darwin.
> We should instead of just adding DECL_EXPLICIT_INSTANTIATION, check
> TARGET_WEAK_NOT_IN_ARCHIVE_TOC.
>
> (!TARGET_WEAK_NOT_IN_ARCHIVE_TOC
> || (! DECL_EXPLICIT_INSTANTIATION (decl)
> && ! DECL_TEMPLATE_SPECIALIZATION (decl)))
>
> This is a darwin only issue.
I'm having trouble deciding exactly what you mean. Is this what you mean:
#define NEEDS_GUARD_P(decl) (!TARGET_WEAK_NOT_IN_ARCHIVE_TOC \
|| (! DECL_EXPLICIT_INSTANTIATION (decl) \
&& ! DECL_TEMPLATE_SPECIALIZATION (decl)))
Or do you mean:
#define NEEDS_GUARD_P(decl) (TREE_PUBLIC (decl) && (DECL_COMMON (decl) \
|| DECL_ONE_ONLY (decl) \
|| DECL_WEAK (decl) \
||
(!TARGET_WEAK_NOT_IN_ARCHIVE_TOC \
|| (! DECL_EXPLICIT_INSTANTIATION (decl) \
&& ! DECL_TEMPLATE_SPECIALIZATION (decl)))))
?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28017