https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92206

--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Nov 27 22:05:41 2019
New Revision: 278784

URL: https://gcc.gnu.org/viewcvs?rev=278784&root=gcc&view=rev
Log:
        PR c++/92206 - ICE with typedef to dependent alias.

rsandifo's patch for 92206 demonstrated a problem with the existing checking
for alias template specializations: they were returning false for a typedef
to an alias template specialization.  Which is sometimes what the caller
wants, and sometimes not: Sometimes we're interested in whether the type was
written as an alias template-id, and sometimes whether it represents one.

The testcase illustrates a case that remained wrong with the earlier patch:
if the typedef is itself an alias template specialization, we can't strip an
underlying dependent alias.

        * pt.c (dependent_alias_template_spec_p)
        (alias_template_specialization_p): Add transparent_typedefs
        parameter.
        (iterative_hash_template_arg, any_template_parm_r)
        (primary_template_specialization_p, tsubst, dependent_type_p_r):
        Adjust.
        * decl.c (check_elaborated_type_specifier): Adjust.
        * error.c (dump_template_bindings, dump_aggr_type): Adjust.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-pr92206-4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/error.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/tree.c
    trunk/gcc/cp/typeck.c

Reply via email to