c++: Revert dependent-array changes [PR 98116]
authorNathan Sidwell <nathan@acm.org>
Fri, 4 Dec 2020 16:34:41 +0000 (08:34 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 4 Dec 2020 16:38:57 +0000 (08:38 -0800)
commit5a26d4a204c8a462a7e0a1a86bb2f25ecd470aad
tree3053f43703cd570003a0a08af1d2b3fc50fa4e62
parent97eaf8c92f9caaa888475f98cc7a55a05672c87b
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.
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/testsuite/g++.dg/template/pr98116.C