public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths
@ 2020-09-29 17:59 wjwray at gmail dot com
2020-09-30 6:16 ` [Bug c++/97246] [10/11 " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: wjwray at gmail dot com @ 2020-09-29 17:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
Bug ID: 97246
Summary: [10.1 regression] mismatched argument pack lengths
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: wjwray at gmail dot com
Target Milestone: ---
A deduced <typename... T> argument pack T... v now gives a
"mismatched argument pack lengths" error for T... and v...
i.e. static_assert( sizeof...(T) == sizeof...(v) ); // Fail !!
Here's a sample, working on 9.3, rejected since 10.1
https://godbolt.org/z/oM9ve5
template <int... Is, typename T>
T arg_T(decltype(Is)..., T, ...);
template <int I, int... Is>
inline constexpr auto get =
[]<typename... T>(decltype(Is)..., T... v, ...) {
static_assert( sizeof...(T) == sizeof...(v) );
if constexpr ( sizeof...(T) == 1 )
return (v,...);
else {
using V = decltype(arg_T<__integer_pack(I)...>(v...));
return get<I,__integer_pack(I)...>.template operator()<V>(v...);
}
};
static_assert( get<0>('\0', short{1}, 2, long{3}) == 0 );
(Will try to simplify & post a reduced sample in a later comment).
Note: the 'mismatched length' error shows when both T and v are used together
e.g. with forwarding references <typename... T> : (T&&... v) : ((T&&)v...)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/97246] [10/11 regression] mismatched argument pack lengths
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
@ 2020-09-30 6:16 ` rguenth at gcc dot gnu.org
2020-09-30 6:36 ` [Bug c++/97246] [10/11 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e marxin at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-30 6:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10.1 regression] |[10/11 regression]
|mismatched argument pack |mismatched argument pack
|lengths |lengths
Keywords| |rejects-valid
Known to fail| |10.1.0
Known to work| |9.3.0
Target Milestone|--- |10.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/97246] [10/11 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
2020-09-30 6:16 ` [Bug c++/97246] [10/11 " rguenth at gcc dot gnu.org
@ 2020-09-30 6:36 ` marxin at gcc dot gnu.org
2020-10-12 11:47 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-30 6:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-09-30
Ever confirmed|0 |1
Summary|[10/11 regression] |[10/11 regression]
|mismatched argument pack |mismatched argument pack
|lengths |lengths since
| |r10-7865-gaedd04caa945260e
Status|UNCONFIRMED |NEW
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Known to fail| |11.0
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r10-7865-gaedd04caa945260e.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/97246] [10/11 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
2020-09-30 6:16 ` [Bug c++/97246] [10/11 " rguenth at gcc dot gnu.org
2020-09-30 6:36 ` [Bug c++/97246] [10/11 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e marxin at gcc dot gnu.org
@ 2020-10-12 11:47 ` rguenth at gcc dot gnu.org
2021-02-11 23:11 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-12 11:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/97246] [10/11 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
` (2 preceding siblings ...)
2020-10-12 11:47 ` rguenth at gcc dot gnu.org
@ 2021-02-11 23:11 ` jason at gcc dot gnu.org
2021-02-12 2:47 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2021-02-11 23:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/97246] [10/11 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
` (3 preceding siblings ...)
2021-02-11 23:11 ` jason at gcc dot gnu.org
@ 2021-02-12 2:47 ` cvs-commit at gcc dot gnu.org
2021-02-27 20:43 ` [Bug c++/97246] [10 " cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-12 2:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:ac001ddd0cb635dec0145bf577ac796894bda398
commit r11-7204-gac001ddd0cb635dec0145bf577ac796894bda398
Author: Jason Merrill <jason@redhat.com>
Date: Thu Feb 11 19:45:22 2021 -0500
c++: variadic lambda template and empty pack [PR97246]
In get<0>, Is is empty, so the first parameter pack of the lambda is empty,
but after the fix for PR94546 we were wrongly associating it with the
partial instantiation of 'v'.
gcc/cp/ChangeLog:
PR c++/97246
PR c++/94546
* pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
(register_parameter_specializations): Not here.
gcc/testsuite/ChangeLog:
PR c++/97246
* g++.dg/cpp2a/lambda-generic-variadic21.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/97246] [10 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
` (4 preceding siblings ...)
2021-02-12 2:47 ` cvs-commit at gcc dot gnu.org
@ 2021-02-27 20:43 ` cvs-commit at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-05-12 21:03 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-27 20:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:f98a3c8a58b3cb39d4073e8a5b2671a5d68b8ce4
commit r10-9393-gf98a3c8a58b3cb39d4073e8a5b2671a5d68b8ce4
Author: Jason Merrill <jason@redhat.com>
Date: Thu Feb 11 19:45:22 2021 -0500
c++: variadic lambda template and empty pack [PR97246]
In get<0>, Is is empty, so the first parameter pack of the lambda is empty,
but after the fix for PR94546 we were wrongly associating it with the
partial instantiation of 'v'.
gcc/cp/ChangeLog:
PR c++/97246
PR c++/94546
* pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
(register_parameter_specializations): Not here.
gcc/testsuite/ChangeLog:
PR c++/97246
* g++.dg/cpp2a/lambda-generic-variadic21.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/97246] [10 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
` (5 preceding siblings ...)
2021-02-27 20:43 ` [Bug c++/97246] [10 " cvs-commit at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-05-12 21:03 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.3 |10.4
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/97246] [10 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
` (6 preceding siblings ...)
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2022-05-12 21:03 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2022-05-12 21:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97246
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.3
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed in 10.3.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-05-12 21:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 17:59 [Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths wjwray at gmail dot com
2020-09-30 6:16 ` [Bug c++/97246] [10/11 " rguenth at gcc dot gnu.org
2020-09-30 6:36 ` [Bug c++/97246] [10/11 regression] mismatched argument pack lengths since r10-7865-gaedd04caa945260e marxin at gcc dot gnu.org
2020-10-12 11:47 ` rguenth at gcc dot gnu.org
2021-02-11 23:11 ` jason at gcc dot gnu.org
2021-02-12 2:47 ` cvs-commit at gcc dot gnu.org
2021-02-27 20:43 ` [Bug c++/97246] [10 " cvs-commit at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-05-12 21:03 ` jason at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).