c++: Fix array type dependency [PR 98107]
authorNathan Sidwell <nathan@acm.org>
Thu, 3 Dec 2020 15:42:09 +0000 (07:42 -0800)
committerNathan Sidwell <nathan@acm.org>
Thu, 3 Dec 2020 15:56:23 +0000 (07:56 -0800)
commit62fb1b9e0da44a15b0434def20724f989d61e27b
treea5fc3e51c9a2d09efcfa3d28b073b595d8df8e7f
parent9c6813437611a877eaffc255a0a1a2cbffa6466d
c++: Fix array type dependency [PR 98107]

I'd missed some paths through build_cplus_array_type, plus, some
arrays come via the C-type builder.  This propagates dependency in
more places and asserts that in the cases where TYPE_DEPENDENT_P_VALID
is unset, the type is non-dependent.

PR c++/98107
gcc/cp/
* tree.c (build_cplus_array_type): Mark dependency of new variant.
(cp_build_qualified_type_real, strip_typedefs): Assert
TYPE_DEPENDENT_P_VALID, or not a dependent type.
gcc/cp/tree.c