c++: check alias match for specializations [PR98116]
This fixes the underlying problem my recent (backedout) changes to
array type creation uncovered. We had paths through
structural_comptypes that ignored alias templates, even when
significant. This adds the necessary checks.
PR c++/98116
gcc/cp/
* typeck.c (structural_comptypes): Move early outs to comptype.
Always check template-alias match when comparing_specializations.
(comptypes): Do early out checking here.
gcc/testsuite/
* g++.dg/template/pr98116.C: Remove dg-ice.
* g++.dg/template/pr98116-2.C: New.