* [Bug c++/111485] [11/12/13/14 Regression] Constraint mismatch on template template parameter
2023-09-19 16:50 [Bug c++/111485] New: Constraint mismatch on template template parameter barry.revzin at gmail dot com
@ 2023-09-19 17:29 ` ppalka at gcc dot gnu.org
2023-09-22 10:26 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-09-19 17:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111485
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |11.4.0, 12.3.0, 13.2.0,
| |14.0
Last reconfirmed| |2023-09-19
Target Milestone|--- |11.5
Known to work| |10.5.0
Status|UNCONFIRMED |ASSIGNED
CC| |ppalka at gcc dot gnu.org
Ever confirmed|0 |1
Summary|Constraint mismatch on |[11/12/13/14 Regression]
|template template parameter |Constraint mismatch on
| |template template parameter
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Keywords| |rejects-valid
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r11-4545-ge1344fe7b6a969.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/111485] [11/12/13/14 Regression] Constraint mismatch on template template parameter
2023-09-19 16:50 [Bug c++/111485] New: Constraint mismatch on template template parameter barry.revzin at gmail dot com
2023-09-19 17:29 ` [Bug c++/111485] [11/12/13/14 Regression] " ppalka at gcc dot gnu.org
@ 2023-09-22 10:26 ` cvs-commit at gcc dot gnu.org
2023-09-24 18:42 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-22 10:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111485
--- Comment #2 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:6f902a42b0afe3f3145bcb864695fc290b5acc3e
commit r14-4224-g6f902a42b0afe3f3145bcb864695fc290b5acc3e
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri Sep 22 06:25:49 2023 -0400
c++: constraint rewriting during ttp coercion [PR111485]
In order to compare the constraints of a ttp with that of its argument,
we rewrite the ttp's constraints in terms of the argument template's
template parameters. The substitution to achieve this currently uses a
single level of template arguments, but that never does the right thing
because a ttp's template parameters always have level >= 2. This patch
fixes this by including the outer template arguments in the substitution,
which ought to match the depth of the ttp.
The second testcase demonstrates it's better to substitute the concrete
outer template arguments instead of generic ones since a ttp's constraints
could depend on outer parameters.
PR c++/111485
gcc/cp/ChangeLog:
* pt.cc (is_compatible_template_arg): New parameter 'args'.
Add the outer template arguments 'args' to 'new_args'.
(convert_template_argument): Pass 'args' to
is_compatible_template_arg.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-ttp5.C: New test.
* g++.dg/cpp2a/concepts-ttp6.C: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/111485] [11/12/13/14 Regression] Constraint mismatch on template template parameter
2023-09-19 16:50 [Bug c++/111485] New: Constraint mismatch on template template parameter barry.revzin at gmail dot com
2023-09-19 17:29 ` [Bug c++/111485] [11/12/13/14 Regression] " ppalka at gcc dot gnu.org
2023-09-22 10:26 ` cvs-commit at gcc dot gnu.org
@ 2023-09-24 18:42 ` cvs-commit at gcc dot gnu.org
2023-12-24 15:11 ` [Bug c++/111485] [11/12 " cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-24 18:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111485
--- Comment #3 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:59f5786c20a42be13ac6fec567ffe840045012ad
commit r13-7836-g59f5786c20a42be13ac6fec567ffe840045012ad
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri Sep 22 06:25:49 2023 -0400
c++: constraint rewriting during ttp coercion [PR111485]
In order to compare the constraints of a ttp with that of its argument,
we rewrite the ttp's constraints in terms of the argument template's
template parameters. The substitution to achieve this currently uses a
single level of template arguments, but that never does the right thing
because a ttp's template parameters always have level >= 2. This patch
fixes this by including the outer template arguments in the substitution,
which ought to match the depth of the ttp.
The second testcase demonstrates it's better to substitute the concrete
outer template arguments instead of generic ones since a ttp's constraints
could depend on outer parameters.
PR c++/111485
gcc/cp/ChangeLog:
* pt.cc (is_compatible_template_arg): New parameter 'args'.
Add the outer template arguments 'args' to 'new_args'.
(convert_template_argument): Pass 'args' to
is_compatible_template_arg.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-ttp5.C: New test.
* g++.dg/cpp2a/concepts-ttp6.C: New test.
(cherry picked from commit 6f902a42b0afe3f3145bcb864695fc290b5acc3e)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/111485] [11/12 Regression] Constraint mismatch on template template parameter
2023-09-19 16:50 [Bug c++/111485] New: Constraint mismatch on template template parameter barry.revzin at gmail dot com
` (2 preceding siblings ...)
2023-09-24 18:42 ` cvs-commit at gcc dot gnu.org
@ 2023-12-24 15:11 ` cvs-commit at gcc dot gnu.org
2023-12-24 15:12 ` cvs-commit at gcc dot gnu.org
2024-01-02 17:59 ` ppalka at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-24 15:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111485
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:f24d6f0031fd515e6497c8c96446afd02aa4dbaa
commit r12-10068-gf24d6f0031fd515e6497c8c96446afd02aa4dbaa
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri Sep 22 06:25:49 2023 -0400
c++: constraint rewriting during ttp coercion [PR111485]
In order to compare the constraints of a ttp with that of its argument,
we rewrite the ttp's constraints in terms of the argument template's
template parameters. The substitution to achieve this currently uses a
single level of template arguments, but that never does the right thing
because a ttp's template parameters always have level >= 2. This patch
fixes this by including the outer template arguments in the substitution,
which ought to match the depth of the ttp.
The second testcase demonstrates it's better to substitute the concrete
outer template arguments instead of generic ones since a ttp's constraints
could depend on outer parameters.
PR c++/111485
gcc/cp/ChangeLog:
* pt.cc (is_compatible_template_arg): New parameter 'args'.
Add the outer template arguments 'args' to 'new_args'.
(convert_template_argument): Pass 'args' to
is_compatible_template_arg.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-ttp5.C: New test.
* g++.dg/cpp2a/concepts-ttp6.C: New test.
(cherry picked from commit 6f902a42b0afe3f3145bcb864695fc290b5acc3e)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/111485] [11/12 Regression] Constraint mismatch on template template parameter
2023-09-19 16:50 [Bug c++/111485] New: Constraint mismatch on template template parameter barry.revzin at gmail dot com
` (3 preceding siblings ...)
2023-12-24 15:11 ` [Bug c++/111485] [11/12 " cvs-commit at gcc dot gnu.org
@ 2023-12-24 15:12 ` cvs-commit at gcc dot gnu.org
2024-01-02 17:59 ` ppalka at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-24 15:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111485
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:84cab505d69038647d98f9340559fc941446e479
commit r11-11168-g84cab505d69038647d98f9340559fc941446e479
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri Sep 22 06:25:49 2023 -0400
c++: constraint rewriting during ttp coercion [PR111485]
In order to compare the constraints of a ttp with that of its argument,
we rewrite the ttp's constraints in terms of the argument template's
template parameters. The substitution to achieve this currently uses a
single level of template arguments, but that never does the right thing
because a ttp's template parameters always have level >= 2. This patch
fixes this by including the outer template arguments in the substitution,
which ought to match the depth of the ttp.
The second testcase demonstrates it's better to substitute the concrete
outer template arguments instead of generic ones since a ttp's constraints
could depend on outer parameters.
PR c++/111485
gcc/cp/ChangeLog:
* pt.c (is_compatible_template_arg): New parameter 'args'.
Add the outer template arguments 'args' to 'new_args'.
(convert_template_argument): Pass 'args' to
is_compatible_template_arg.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-ttp5.C: New test.
* g++.dg/cpp2a/concepts-ttp6.C: New test.
(cherry picked from commit 6f902a42b0afe3f3145bcb864695fc290b5acc3e)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/111485] [11/12 Regression] Constraint mismatch on template template parameter
2023-09-19 16:50 [Bug c++/111485] New: Constraint mismatch on template template parameter barry.revzin at gmail dot com
` (4 preceding siblings ...)
2023-12-24 15:12 ` cvs-commit at gcc dot gnu.org
@ 2024-01-02 17:59 ` ppalka at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-01-02 17:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111485
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for 11.5/12.4/13.3.
^ permalink raw reply [flat|nested] 7+ messages in thread