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