* [Bug c++/108179] [11/12/13 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
@ 2022-12-19 16:22 ` pinskia at gcc dot gnu.org
2022-12-19 16:28 ` pinskia at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-19 16:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.4
Known to fail| |11.3.0, 12.1.0
Known to work| |11.1.0, 11.2.0
Summary|[11/12 regression] ICE |[11/12/13 regression] ICE
|related to template |related to template
|template parameters in |template parameters in
|tsubst, at cp/pt.cc:15782 |tsubst, at cp/pt.cc:15782
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12/13 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
2022-12-19 16:22 ` [Bug c++/108179] [11/12/13 " pinskia at gcc dot gnu.org
@ 2022-12-19 16:28 ` pinskia at gcc dot gnu.org
2022-12-21 12:44 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-19 16:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-12-19
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12/13 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
2022-12-19 16:22 ` [Bug c++/108179] [11/12/13 " pinskia at gcc dot gnu.org
2022-12-19 16:28 ` pinskia at gcc dot gnu.org
@ 2022-12-21 12:44 ` rguenth at gcc dot gnu.org
2022-12-21 15:39 ` ppalka at gcc dot gnu.org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-21 12:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12/13 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (2 preceding siblings ...)
2022-12-21 12:44 ` rguenth at gcc dot gnu.org
@ 2022-12-21 15:39 ` ppalka at gcc dot gnu.org
2023-03-10 18:52 ` jason at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-12-21 15:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=104107
Keywords|needs-bisection |
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r12-7236-g2c3309e3d0f5cb
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12/13 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (3 preceding siblings ...)
2022-12-21 15:39 ` ppalka at gcc dot gnu.org
@ 2023-03-10 18:52 ` jason at gcc dot gnu.org
2023-03-15 12:45 ` cvs-commit at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-10 18:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12/13 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (4 preceding siblings ...)
2023-03-10 18:52 ` jason at gcc dot gnu.org
@ 2023-03-15 12:45 ` cvs-commit at gcc dot gnu.org
2023-03-15 12:45 ` cvs-commit at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-15 12:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:5ccbf162511b896672a72934c3cafd37a42d6438
commit r13-6692-g5ccbf162511b896672a72934c3cafd37a42d6438
Author: Jason Merrill <jason@redhat.com>
Date: Tue Mar 14 22:07:45 2023 -0400
c++: coerce_template_template_parms interface tweak
This should have no semantic effect, but is a prerequisite for the PR108179
fix to follow.
PR c++/108179
gcc/cp/ChangeLog:
* pt.cc (coerce_template_template_parms): Take the arg and parm
templates directly.
(coerce_template_template_parm): Adjust.
(template_template_parm_bindings_ok_p): Adjust.
(convert_template_argument): Adjust.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12/13 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (5 preceding siblings ...)
2023-03-15 12:45 ` cvs-commit at gcc dot gnu.org
@ 2023-03-15 12:45 ` cvs-commit at gcc dot gnu.org
2023-03-15 12:47 ` [Bug c++/108179] [11/12 " jason at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-15 12:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:3ea64aad06a2b32739028bae03b9b9a5691d2d30
commit r13-6693-g3ea64aad06a2b32739028bae03b9b9a5691d2d30
Author: Jason Merrill <jason@redhat.com>
Date: Fri Mar 10 14:55:27 2023 -0500
c++: passing one ttp to another [PR108179]
I kept trying to improve our choice of how many levels of outer_args to
add,
when really the problem was that outer_args are for PARM and for this
reverse deduction we should be adding the outer arguments for ARG.
I spent quite a while trying to get DECL_CONTEXT set consistently on
template template parameters that have gone through
reduce_template_parm_level before I realized I could just use
current_scope().
PR c++/108179
PR c++/104107
PR c++/95036
gcc/cp/ChangeLog:
* pt.cc (coerce_template_template_parms): Use args from
DECL_CONTEXT (arg_tmpl) instead of outer_args.
gcc/testsuite/ChangeLog:
* g++.dg/template/ttp35.C: New test.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (6 preceding siblings ...)
2023-03-15 12:45 ` cvs-commit at gcc dot gnu.org
@ 2023-03-15 12:47 ` jason at gcc dot gnu.org
2023-03-15 12:55 ` s at stu dot scot
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-15 12:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12/13 regression] ICE |[11/12 regression] ICE
|related to template |related to template
|template parameters in |template parameters in
|tsubst, at cp/pt.cc:15782 |tsubst, at cp/pt.cc:15782
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 13 so far.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (7 preceding siblings ...)
2023-03-15 12:47 ` [Bug c++/108179] [11/12 " jason at gcc dot gnu.org
@ 2023-03-15 12:55 ` s at stu dot scot
2023-04-22 0:31 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: s at stu dot scot @ 2023-03-15 12:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
--- Comment #6 from stu t <s at stu dot scot> ---
Thank you for looking into this! :)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (8 preceding siblings ...)
2023-03-15 12:55 ` s at stu dot scot
@ 2023-04-22 0:31 ` jason at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2023-04-22 0:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to stu t from comment #6)
> Thank you for looking into this! :)
You're welcome! I'm currently leaning toward backporting this to 12.4 rather
than 12.3, but am interested in your thoughts.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (9 preceding siblings ...)
2023-04-22 0:31 ` jason at gcc dot gnu.org
@ 2023-05-29 10:07 ` jakub at gcc dot gnu.org
2023-07-20 1:10 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |11.5
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (10 preceding siblings ...)
2023-05-29 10:07 ` jakub at gcc dot gnu.org
@ 2023-07-20 1:10 ` jason at gcc dot gnu.org
2023-07-26 21:22 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2023-07-20 1:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
This patch caused PR110566.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (11 preceding siblings ...)
2023-07-20 1:10 ` jason at gcc dot gnu.org
@ 2023-07-26 21:22 ` cvs-commit at gcc dot gnu.org
2023-07-26 21:22 ` cvs-commit at gcc dot gnu.org
2023-08-07 23:27 ` cvs-commit at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-26 21:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:b3adcc60dcf3314f47f5409aecef40607f82b80b
commit r14-2809-gb3adcc60dcf3314f47f5409aecef40607f82b80b
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed Jul 26 17:21:26 2023 -0400
c++: passing partially inst tmpl as ttp [PR110566]
Since the template arguments 'pargs' we pass to coerce_template_parms from
coerce_template_template_parms are always a full set, we need to make sure
we always pass the parameters of the most general template because if the
template is partially instantiated then the levels won't match up. In the
testcase below during said call to coerce_template_parms the parameters are
{X, Y}, both level 1 rather than 2, and the arguments are {{int}, {N, M}},
which results in a crash during auto deduction for parameters' types.
PR c++/110566
PR c++/108179
gcc/cp/ChangeLog:
* pt.cc (coerce_template_template_parms): Simplify by using
DECL_INNERMOST_TEMPLATE_PARMS and removing redundant asserts.
Always pass the parameters of the most general template to
coerce_template_parms.
gcc/testsuite/ChangeLog:
* g++.dg/template/ttp38.C: New test.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (12 preceding siblings ...)
2023-07-26 21:22 ` cvs-commit at gcc dot gnu.org
@ 2023-07-26 21:22 ` cvs-commit at gcc dot gnu.org
2023-08-07 23:27 ` cvs-commit at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-26 21:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:b8218eb2266811991b8163f36d5c1d974cb50b93
commit r14-2810-gb8218eb2266811991b8163f36d5c1d974cb50b93
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed Jul 26 17:21:43 2023 -0400
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.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782
2022-12-19 16:11 [Bug c++/108179] New: [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 s at stu dot scot
` (13 preceding siblings ...)
2023-07-26 21:22 ` cvs-commit at gcc dot gnu.org
@ 2023-08-07 23:27 ` cvs-commit at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-07 23:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108179
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:2c6e76ff039782401f705cacda60c11f8dfac3b1
commit r13-7692-g2c6e76ff039782401f705cacda60c11f8dfac3b1
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed Jul 26 17:21:26 2023 -0400
c++: passing partially inst tmpl as ttp [PR110566]
Since the template arguments 'pargs' we pass to coerce_template_parms from
coerce_template_template_parms are always a full set, we need to make sure
we always pass the parameters of the most general template because if the
template is partially instantiated then the levels won't match up. In the
testcase below during said call to coerce_template_parms the parameters are
{X, Y}, both level 1 rather than 2, and the arguments are {{int}, {N, M}},
which results in a crash during auto deduction for parameters' types.
PR c++/110566
PR c++/108179
gcc/cp/ChangeLog:
* pt.cc (coerce_template_template_parms): Simplify by using
DECL_INNERMOST_TEMPLATE_PARMS and removing redundant asserts.
Always pass the parameters of the most general template to
coerce_template_parms.
gcc/testsuite/ChangeLog:
* g++.dg/template/ttp38.C: New test.
(cherry picked from commit b3adcc60dcf3314f47f5409aecef40607f82b80b)
^ permalink raw reply [flat|nested] 16+ messages in thread