]> git.ipfire.org Git - people/ms/gcc.git/commit
cgraph: A COMDAT decl always has non-zero address.
authorJason Merrill <jason@redhat.com>
Wed, 26 Feb 2020 18:03:23 +0000 (13:03 -0500)
committerJason Merrill <jason@redhat.com>
Wed, 26 Feb 2020 19:09:03 +0000 (14:09 -0500)
commitf2f70af7c52720a0905a455425de0d6ca4fb1dc4
tree0ed55ac95d6e283e202c64277baae347a9160e49
parentc51ac41714469104ee6120db3eedfb0964290502
cgraph: A COMDAT decl always has non-zero address.

We should be able to assume that a template instantiation or other COMDAT
has non-zero address even if MAKE_DECL_ONE_ONLY for the target sets
DECL_WEAK and we haven't yet decided to emit a definition in this
translation unit.

gcc/ChangeLog
2020-02-26  Jason Merrill  <jason@redhat.com>

PR c++/92003
* symtab.c (symtab_node::nonzero_address): A DECL_COMDAT decl has
non-zero address even if weak and not yet defined.
gcc/ChangeLog
gcc/symtab.c
gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C [new file with mode: 0644]