https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101452
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The point was that if it is referenced somewhere, the definition needs to be in some TU and that TU will then have debug info for it, similarly to what we do with namespace scope extern decls. The DW_AT_const_value check is there because if it has a const initializer, it might not have a definition at all even when it is used (when not odr used).