diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-07-26 17:21:43 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-07-26 17:21:43 -0400 |
commit | b8218eb2266811991b8163f36d5c1d974cb50b93 (patch) | |
tree | 6341b71cb8b21c060ee385bd3ff33dbe981f85df /gcc/fortran | |
parent | b3adcc60dcf3314f47f5409aecef40607f82b80b (diff) | |
download | gcc-b8218eb2266811991b8163f36d5c1d974cb50b93.zip gcc-b8218eb2266811991b8163f36d5c1d974cb50b93.tar.gz gcc-b8218eb2266811991b8163f36d5c1d974cb50b93.tar.bz2 |
c++: passing partially inst ttp as ttp [PR110566]
The previous fix doesn't work for partially instantiated ttps mainly
because most_general_template is a no-op for them. This patch fixes
this by giving such ttps a DECL_TEMPLATE_INFO (extending the
r11-734-g2fb595f8348e16 fix) with which most_general_template can obtain
the original, unlowered ttp.
This patch additionally makes coerce_template_template_parms use the
correct amount of levels from the scope of a ttp argument.
PR c++/110566
PR c++/108179
gcc/cp/ChangeLog:
* pt.cc (reduce_template_parm_level): Set DECL_TEMPLATE_INFO
on the DECL_TEMPLATE_RESULT of the new ttp.
(add_defaults_to_ttp): Make a copy of the original ttp's
DECL_TEMPLATE_RESULT, and update this copy's DECL_TEMPLATE_INFO
as well.
(coerce_template_template_parms): Make sure 'scope_args' has
the right amount of levels for the ttp argument.
(most_general_template): Handle template template parameters.
(rewrite_template_parm): Set DECL_TEMPLATE_RESULT on the
DECL_TEMPLATE_RESULT of the new ttp.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/class-deduction115.C: New test.
* g++.dg/template/ttp39.C: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions