This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/61232] [4.10 Regression] link errors building libgo
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 May 2014 22:33:07 +0000
- Subject: [Bug go/61232] [4.10 Regression] link errors building libgo
- Auto-submitted: auto-generated
- References: <bug-61232-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61232
--- Comment #9 from Jan Hubicka <hubicka at ucw dot cz> ---
> The naming is confusing and but the idea seems sound. It doesn't make sense
> for a static symbol to be DECL_ONE_ONLY. But currently DECL_ONE_ONLY just
> means that the symbol has a comdat group. So given that, I guess it makes
> sense to speak about DECL_ONE_ONLY && !TREE_PUBLIC meaning a static symbol in a
> comdat group, where the signature for the comdat group must obviously be some
> other symbol.
I agree that DECL_ONE_ONLY is confusing in this respect - perhaps we can change
its
definition to contain && (TREE_PUBLIC (decl) || DECL_EXTERNAL (decl)) and
update
uses where we really care about COMDAT_GROUP being non-null to use
DECL_COMDAT_GROUP () != NULL.
I think those are basically the output machinery bits in varasm.c setting up
the proper
comdat section.
If you think it is cleaner, I will prepare patch.
Honza