c++: tpl-tpl-parms are not canonicalizable types [pr94454]
authorNathan Sidwell <nathan@acm.org>
Mon, 20 Apr 2020 13:52:30 +0000 (06:52 -0700)
committerNathan Sidwell <nathan@acm.org>
Mon, 20 Apr 2020 13:52:30 +0000 (06:52 -0700)
commita6f400239d792ddcff106be22b04fdf3f9b2894a
tree9373c7a21755e2cf048c377c9a06e0595de60035
parent7fcb93431ef18a31c9af142f77faa176bbd9b3dc
c++: tpl-tpl-parms are not canonicalizable types [pr94454]

We treat tpl-tpl-parms as types.  They're not; bound-tpl-tpl-parms
are.  We can get away with them being type-like.  Unfortunately we
give the original level==orig_level case a canonical type, but the
reduced cases of level<orig_level get structural equality.  This patch
gives them structural type always.

* pt.c (canonical_type_parameter): Assert not a tpl-tpl-parm.
(process_template_parm): tpl-tpl-parms are structural.
(rewrite_template_parm): Propagate structuralness.
gcc/cp/ChangeLog
gcc/cp/pt.c