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

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:523836716137d0f7f4088c85752a980f5f971b36

commit r15-2331-g523836716137d0f7f4088c85752a980f5f971b36
Author: Patrick Palka <ppa...@redhat.com>
Date:   Thu Jul 25 19:05:19 2024 -0400

    c++: non-template alias with dependent attributes [PR115897]

    This patch generalizes our support for dependent attributes on alias
    templates to also support them on non-template aliases.  The main
    addition is a new predicate dependent_opaque_alias_p controlling whether
    we can treat an alias (template or non-template) as type-equivalent to
    its expansion.

            PR c++/115897

    gcc/cp/ChangeLog:

            * cp-tree.h (dependent_opaque_alias_p): Declare.
            * pt.cc (push_template_decl): Manually mark a dependent opaque
            alias or dependent alias template specialization as dependent,
            and use structural equality for them.
            (dependent_opaque_alias_p): Define.
            (alias_template_specialization_p): Don't look through an
            opaque alias.
            (complex_alias_template_p): Use dependent_opaque_alias_p instead of
            any_dependent_template_arguments_p directly.
            (dependent_alias_template_spec_p): Don't look through an
            opaque alias.
            (get_underlying_template): Use dependent_opaque_alias_p instead of
            any_dependent_template_arguments_p.
            (instantiate_alias_template): Mention same logic in
            push_template_decl.
            (dependent_type_p_r): Remove dependent_alias_template_spec_p check.
            (any_template_arguments_need_structural_equality_p): Return true
            for a dependent opaque alias.
            (alias_ctad_tweaks): Use template_args_equal instead of same_type_p
            followed by dependent_alias_template_spec_p.
            * tree.cc (strip_typedefs): Don't strip an opaque alias.
            * typeck.cc (structural_comptypes): Compare declaration attributes
            for an opaque alias.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/alias-decl-79.C: Remove xfails.
            * g++.dg/cpp0x/alias-decl-79a.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>

Reply via email to