public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct
@ 2022-02-23 20:03 krzysio.kurek at wp dot pl
2022-02-23 20:30 ` [Bug c++/104670] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: krzysio.kurek at wp dot pl @ 2022-02-23 20:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104670
Bug ID: 104670
Summary: ICE when using decltype of a lambda returning a struct
inside of a struct
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: krzysio.kurek at wp dot pl
Target Milestone: ---
Created attachment 52502
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52502&action=edit
-freport-bug output
GCC ICEs when compiling the following piece of code:
struct foo {
decltype([] { return (struct {
int fn() {}
}){}; }) bar;
};
Compiled with `-std=c++20`
Past stable releases of GCC report "confused by earlier errors, bailing out"
without crashing instead.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/104670] ICE when using decltype of a lambda returning a struct inside of a struct
2022-02-23 20:03 [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct krzysio.kurek at wp dot pl
@ 2022-02-23 20:30 ` pinskia at gcc dot gnu.org
2022-02-23 21:08 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-23 20:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104670
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to krzysio.kurek from comment #0)
> Compiled with `-std=c++20`
> Past stable releases of GCC report "confused by earlier errors, bailing out"
> without crashing instead.
Right. That means it was an internal compiler error after an error message.
That happens with released gcc where gcc is configured by default to
--enable-checking=release .
So this is not a regression.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/104670] ICE when using decltype of a lambda returning a struct inside of a struct
2022-02-23 20:03 [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct krzysio.kurek at wp dot pl
2022-02-23 20:30 ` [Bug c++/104670] " pinskia at gcc dot gnu.org
@ 2022-02-23 21:08 ` pinskia at gcc dot gnu.org
2022-02-24 13:12 ` [Bug c++/104670] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-23 21:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104670
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-02-23
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=39751
Keywords| |error-recovery,
| |ice-checking,
| |ice-on-invalid-code
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/104670] [9/10/11/12 Regression] ICE when using decltype of a lambda returning a struct inside of a struct
2022-02-23 20:03 [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct krzysio.kurek at wp dot pl
2022-02-23 20:30 ` [Bug c++/104670] " pinskia at gcc dot gnu.org
2022-02-23 21:08 ` pinskia at gcc dot gnu.org
@ 2022-02-24 13:12 ` jakub at gcc dot gnu.org
2022-05-27 9:47 ` [Bug c++/104670] [10/11/12/13 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-24 13:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104670
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
Summary|ICE when using decltype of |[9/10/11/12 Regression] ICE
|a lambda returning a struct |when using decltype of a
|inside of a struct |lambda returning a struct
| |inside of a struct
Priority|P3 |P4
Target Milestone|--- |9.5
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, it is a regression since
r9-4045-g0c1e0d63fe0ceabbd04384070f3b59f8bf50de09
because before that we rejected the testcase, now we rejecte it for a different
reason and ICE during error recovery.
But error recovery ICEs are lower priority.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/104670] [10/11/12/13 Regression] ICE when using decltype of a lambda returning a struct inside of a struct
2022-02-23 20:03 [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct krzysio.kurek at wp dot pl
` (2 preceding siblings ...)
2022-02-24 13:12 ` [Bug c++/104670] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
@ 2022-05-27 9:47 ` rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104670
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/104670] [10/11/12/13 Regression] ICE when using decltype of a lambda returning a struct inside of a struct
2022-02-23 20:03 [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct krzysio.kurek at wp dot pl
` (3 preceding siblings ...)
2022-05-27 9:47 ` [Bug c++/104670] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug c++/104670] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-04-13 20:18 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104670
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/104670] [11/12/13/14 Regression] ICE when using decltype of a lambda returning a struct inside of a struct
2022-02-23 20:03 [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct krzysio.kurek at wp dot pl
` (4 preceding siblings ...)
2022-06-28 10:48 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:42 ` rguenth at gcc dot gnu.org
2024-04-13 20:18 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104670
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/104670] [11/12/13/14 Regression] ICE when using decltype of a lambda returning a struct inside of a struct
2022-02-23 20:03 [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct krzysio.kurek at wp dot pl
` (5 preceding siblings ...)
2023-07-07 10:42 ` [Bug c++/104670] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-04-13 20:18 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-13 20:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104670
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|11.5 |12.0
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=101911
Resolution|--- |FIXED
Keywords| |c++-lambda
Blocks| |107430
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 12.
Note you can make this an ICE after an invalid error with:
```
struct foo {
decltype([] { struct a{
int fn() {}
}; a{}; }) bar;
};
```
But that is really PR 101911 .
So still closing as fixed.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107430
[Bug 107430] [meta-bug] lambda in decltype
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-04-13 20:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 20:03 [Bug c++/104670] New: ICE when using decltype of a lambda returning a struct inside of a struct krzysio.kurek at wp dot pl
2022-02-23 20:30 ` [Bug c++/104670] " pinskia at gcc dot gnu.org
2022-02-23 21:08 ` pinskia at gcc dot gnu.org
2022-02-24 13:12 ` [Bug c++/104670] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2022-05-27 9:47 ` [Bug c++/104670] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug c++/104670] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-04-13 20:18 ` 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).