diff options
author | Marek Polacek <polacek@redhat.com> | 2019-10-21 18:45:45 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2019-10-21 18:45:45 +0000 |
commit | afa8c090bf5ee17d89628b4885efad3a7ea62505 (patch) | |
tree | 65f87ce073121c8d4bd994dcf4e5e74123b412fd /gcc/tree-ssa-alias.h | |
parent | e011c0100a83030e0cfd230658debbb6c97660a1 (diff) | |
download | gcc-afa8c090bf5ee17d89628b4885efad3a7ea62505.zip gcc-afa8c090bf5ee17d89628b4885efad3a7ea62505.tar.gz gcc-afa8c090bf5ee17d89628b4885efad3a7ea62505.tar.bz2 |
PR c++/92062 - ODR-use ignored for static member of class template.
has_value_dependent_address wasn't stripping location wrappers so it
gave the wrong answer for "&x" in the static_assert. That led us to
thinking that the expression isn't instantiation-dependent, and we
skipped static initialization of A<0>::x.
This patch adds stripping so that has_value_dependent_address gives the
same answer as it used to before the location wrappers addition.
* pt.c (has_value_dependent_address): Strip location wrappers.
* g++.dg/cpp0x/constexpr-odr1.C: New test.
* g++.dg/cpp0x/constexpr-odr2.C: New test.
From-SVN: r277266
Diffstat (limited to 'gcc/tree-ssa-alias.h')
0 files changed, 0 insertions, 0 deletions