diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-12-04 08:34:41 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-12-04 08:38:57 -0800 |
commit | 5a26d4a204c8a462a7e0a1a86bb2f25ecd470aad (patch) | |
tree | 3053f43703cd570003a0a08af1d2b3fc50fa4e62 /gcc/cp/pt.c | |
parent | 97eaf8c92f9caaa888475f98cc7a55a05672c87b (diff) | |
download | gcc-5a26d4a204c8a462a7e0a1a86bb2f25ecd470aad.zip gcc-5a26d4a204c8a462a7e0a1a86bb2f25ecd470aad.tar.gz gcc-5a26d4a204c8a462a7e0a1a86bb2f25ecd470aad.tar.bz2 |
c++: Revert dependent-array changes [PR 98116]
The changes reverted here are exposing an existing problem with alias
template comparisons. The typename_type changes are also incomplete,
possibly for similar reasons. It seems safer to revert them, fix the
underlying issue and then move forwards.
The testcases is adjusted to more robustly check the specialization
table, and ICEs with and without the c++ changes.
Revert:
62fb1b9e0da c++: Fix array type dependency [PR 98107]
07589ca2b2c c++: typename_type structural comparison
29ae1d7751 c++: Extend build_array_type API
PR c++/98116
gcc/cp/
* cp-tree.h (comparing_typenames): Delete.
(cplus_build_array_type): Remove default parm.
* pt.c (comparing_typenames): Delete.
(spec_hasher::equal): Don't increment it.
* tree.c (set_array_type_canon): Remove dep parm.
(build_cplus_array_type): Remove dep parm changes.
(cp_build_qualified_type_real): Remove dependent array type
changes.
(strip_typedefs): Likewise.
* typeck.c (structural_comptypes): Revert comparing_typename
changes.
gcc/testsuite/
* g++.dg/template/pr98116.C: Enable robust checking.
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 0893182..9e8113d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1704,19 +1704,16 @@ register_specialization (tree spec, tree tmpl, tree args, bool is_friend, return spec; } -/* Restricts tree and type comparisons. */ -int comparing_specializations; -int comparing_typenames; - /* Returns true iff two spec_entry nodes are equivalent. */ +int comparing_specializations; + bool spec_hasher::equal (spec_entry *e1, spec_entry *e2) { int equal; ++comparing_specializations; - ++comparing_typenames; equal = (e1->tmpl == e2->tmpl && comp_template_args (e1->args, e2->args)); if (equal && flag_concepts @@ -1732,7 +1729,6 @@ spec_hasher::equal (spec_entry *e1, spec_entry *e2) equal = equivalent_constraints (c1, c2); } --comparing_specializations; - --comparing_typenames; return equal; } |