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

--- Comment #4 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:df5fa3a3d0d7f2413c832548c88f76dfe67802fd

commit r15-8671-gdf5fa3a3d0d7f2413c832548c88f76dfe67802fd
Author: Patrick Palka <ppa...@redhat.com>
Date:   Sat Mar 22 10:15:52 2025 -0400

    c++: structural equality and partially inst typedef [PR119379]

    Complex alias templates (and their dependent specializations) always use
    structural equality because we need to treat them as transparent in some
    contexts but not others.  Structural-ness however wasn't being preserved
    during partial instantiation, which for the below testcase leads to the
    checking ICE

      same canonical type node for different types 'S<int>::P<U>' and
'pair<int, U>'

    when comparing those two types with comparing_dependent_aliases set
    (from alias_ctad_tweaks).

    This patch fixes this by making us preserve structural-ness for
    partially instantiated typedefs in general.

            PR c++/119379

    gcc/cp/ChangeLog:

            * pt.cc (tsubst_decl) <case TYPE_DECL>: Preserve structural-ness
            of a partially instantiated typedef.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/class-deduction-alias24.C: New test.

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

Reply via email to