public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98500] New: ICE template template parameter with default parameter lambda
@ 2021-01-02 14:41 bastien.penavayre at epitech dot eu
2021-01-04 12:31 ` [Bug c++/98500] " marxin at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bastien.penavayre at epitech dot eu @ 2021-01-02 14:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98500
Bug ID: 98500
Summary: ICE template template parameter with default parameter
lambda
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bastien.penavayre at epitech dot eu
Target Milestone: ---
The following causes an ICE:
template<auto> struct X {};
template<template<auto=[]{}> class H = X, class = H<>>
struct A
{
};
static_assert(sizeof(A<>));
Message:
<source>:5:24: internal compiler error: in tsubst, at cp/pt.c:15258
5 | template<template<auto=[]{}> class H = X, class = H<>>
| ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Occurs from GCC 9.1 to trunk, tested through compiler explorer:
gcc 9.1: https://godbolt.org/z/ad7Gox
gcc trunk: https://godbolt.org/z/K367rj
Is probably related to the following tickets:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97610
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96908
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93595
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/98500] ICE template template parameter with default parameter lambda
2021-01-02 14:41 [Bug c++/98500] New: ICE template template parameter with default parameter lambda bastien.penavayre at epitech dot eu
@ 2021-01-04 12:31 ` marxin at gcc dot gnu.org
2021-12-22 3:52 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-04 12:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98500
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started to ICE with r9-6733-g03bed1538f8c71f0, it was rejected before that:
pr98500.C:3:52: error: could not convert ‘<lambda closure object><lambda()>{}’
from ‘<lambda()>’ to ‘<lambda()>’
3 | template<template<auto=[]{}> class H = X, class = H<>>
| ^
pr98500.C:9:24: error: template argument 2 is invalid
9 | static_assert(sizeof(A<>));
| ^
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/98500] ICE template template parameter with default parameter lambda
2021-01-02 14:41 [Bug c++/98500] New: ICE template template parameter with default parameter lambda bastien.penavayre at epitech dot eu
2021-01-04 12:31 ` [Bug c++/98500] " marxin at gcc dot gnu.org
@ 2021-12-22 3:52 ` pinskia at gcc dot gnu.org
2022-02-23 8:14 ` friedkeenan at protonmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-22 3:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98500
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-12-22
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/98500] ICE template template parameter with default parameter lambda
2021-01-02 14:41 [Bug c++/98500] New: ICE template template parameter with default parameter lambda bastien.penavayre at epitech dot eu
2021-01-04 12:31 ` [Bug c++/98500] " marxin at gcc dot gnu.org
2021-12-22 3:52 ` pinskia at gcc dot gnu.org
@ 2022-02-23 8:14 ` friedkeenan at protonmail dot com
2023-05-26 6:56 ` pinskia at gcc dot gnu.org
2024-04-15 22:21 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: friedkeenan at protonmail dot com @ 2022-02-23 8:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98500
friedkeenan at protonmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |friedkeenan at protonmail dot com
--- Comment #3 from friedkeenan at protonmail dot com ---
I've triggered this without a template template parameter:
#include <type_traits>
template<auto unique = [] {}>
struct unique_empty_type { };
template<bool IsPresent, typename T>
using maybe_present = std::conditional_t<IsPresent, T, unique_empty_type<>>;
using empty = maybe_present<false, int>;
Godbolt link: https://godbolt.org/z/hf9csv8ne
Upon instantiating `empty`, an ICE is thrown. To me this seems like the same
bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/98500] ICE template template parameter with default parameter lambda
2021-01-02 14:41 [Bug c++/98500] New: ICE template template parameter with default parameter lambda bastien.penavayre at epitech dot eu
` (2 preceding siblings ...)
2022-02-23 8:14 ` friedkeenan at protonmail dot com
@ 2023-05-26 6:56 ` pinskia at gcc dot gnu.org
2024-04-15 22:21 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-26 6:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98500
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oficsu at gmail dot com
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 109978 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/98500] ICE template template parameter with default parameter lambda
2021-01-02 14:41 [Bug c++/98500] New: ICE template template parameter with default parameter lambda bastien.penavayre at epitech dot eu
` (3 preceding siblings ...)
2023-05-26 6:56 ` pinskia at gcc dot gnu.org
@ 2024-04-15 22:21 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-15 22:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98500
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2021-12-22 00:00:00 |2024-4-15
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to friedkeenan from comment #3)
> I've triggered this without a template template parameter:
Note the testcase in comment #0 still ICEs while the testcase in comment #3 was
fixed for GCC 14 by the recent lambda template patches.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-15 22:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-02 14:41 [Bug c++/98500] New: ICE template template parameter with default parameter lambda bastien.penavayre at epitech dot eu
2021-01-04 12:31 ` [Bug c++/98500] " marxin at gcc dot gnu.org
2021-12-22 3:52 ` pinskia at gcc dot gnu.org
2022-02-23 8:14 ` friedkeenan at protonmail dot com
2023-05-26 6:56 ` pinskia at gcc dot gnu.org
2024-04-15 22:21 ` pinskia 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).