cgraph: A COMDAT decl always has non-zero address.
authorJason Merrill <jason@redhat.com>
Wed, 5 Feb 2020 06:02:22 +0000 (01:02 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 6 Feb 2020 02:22:40 +0000 (21:22 -0500)
commit3774c0b934c4fe13c2d527b757002bdea09f7039
tree56ada75be841738a061433b8991f0a71374b071c
parentb8e165be65e967addb4913369d39a182c442eecc
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.

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]