https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98538
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Oops, I hadn't noticed that this PR has an assignee, since it's still in NEW. Anyway, this was my patch: --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1341,7 +1341,9 @@ cp_build_qualified_type_real (tree type, if (!t) { gcc_checking_assert (TYPE_DEPENDENT_P_VALID (type) - || !dependent_type_p (type)); + || !dependent_type_p (type) + || dependent_alias_template_spec_p (type, + nt_opaque)); t = build_cplus_array_type (element_type, TYPE_DOMAIN (type), TYPE_DEPENDENT_P (type));