c++: Fix qualified array-type construction [PR 98538]
authorNathan Sidwell <nathan@acm.org>
Fri, 15 Jan 2021 19:38:43 +0000 (11:38 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 15 Jan 2021 20:45:18 +0000 (12:45 -0800)
commit9beb6d88effdab4209beb8bc5e4b8773317f1d33
treea2e246e22c663ee17ad9ba708068fde08f6c9bea
parente1efa6af61ab54faf0d8d091328e0c6a1141050c
c++: Fix qualified array-type construction [PR 98538]

This was an assert that was too picky.  The reason I had to alter
array construction was that on stream in, we cannot dynamically determine
a type's dependentness.  Thus on stream out of the 'problematic' types,
we save the dependentness for reconstruction.  Fortunately the paths into
cp_build_qualified_type_real from streamin with arrays do have the array's
dependentess set as needed.

PR c++/98538
gcc/cp/
* tree.c (cp_build_qualified_type_real): Propagate an array's
dependentness to the copy, if known.
gcc/testsuite/
* g++.dg/template/pr98538.C: New.
gcc/cp/tree.c
gcc/testsuite/g++.dg/template/pr98538.C [new file with mode: 0644]