public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98150] New: Segfault from statement expression in lambda noexcept
@ 2020-12-05 0:18 ndkrempel at gmail dot com
2020-12-05 0:34 ` [Bug c++/98150] " ndkrempel at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ndkrempel at gmail dot com @ 2020-12-05 0:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98150
Bug ID: 98150
Summary: Segfault from statement expression in lambda noexcept
Product: gcc
Version: 10.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ndkrempel at gmail dot com
Target Milestone: ---
The following code produces a segfault in gcc versions 8.1 up to 10.2 and trunk
(using -std=c++2a or -std=c++20):
int main() {
[]()noexcept(noexcept(({constexpr int&&x=1;})));
}
Here's the stack trace from trunk (https://gcc.godbolt.org/z/nqoojv):
<source>: In function 'int main()':
<source>:2:44: internal compiler error: Segmentation fault
2 | []()noexcept(noexcept(({constexpr int&&x=1;})));
| ^
0x1c354c9 internal_error(char const*, ...)
???:0
0x80119c mangle_ref_init_variable(tree_node*)
???:0
0x6b4419 make_temporary_var_for_ref_to_temp(tree_node*, tree_node*)
???:0
0x9892ae store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
???:0
0x7974d0 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
???:0
0x87f79c c_parse_file()
???:0
0x9f9512 c_common_parse_file()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
ASM generation compiler returned: 1
<source>: In function 'int main()':
<source>:2:44: internal compiler error: Segmentation fault
2 | []()noexcept(noexcept(({constexpr int&&x=1;})));
| ^
0x1c354c9 internal_error(char const*, ...)
???:0
0x80119c mangle_ref_init_variable(tree_node*)
???:0
0x6b4419 make_temporary_var_for_ref_to_temp(tree_node*, tree_node*)
???:0
0x9892ae store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
???:0
0x7974d0 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
???:0
0x87f79c c_parse_file()
???:0
0x9f9512 c_common_parse_file()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Execution build compiler returned: 1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/98150] Segfault from statement expression in lambda noexcept
2020-12-05 0:18 [Bug c++/98150] New: Segfault from statement expression in lambda noexcept ndkrempel at gmail dot com
@ 2020-12-05 0:34 ` ndkrempel at gmail dot com
2020-12-05 0:51 ` ndkrempel at gmail dot com
2021-08-03 6:04 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ndkrempel at gmail dot com @ 2020-12-05 0:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98150
--- Comment #1 from Nick Krempel <ndkrempel at gmail dot com> ---
The following slightly simpler code also repros the issue:
int main() {
[]()noexcept(({constexpr int&&x=1;}));
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/98150] Segfault from statement expression in lambda noexcept
2020-12-05 0:18 [Bug c++/98150] New: Segfault from statement expression in lambda noexcept ndkrempel at gmail dot com
2020-12-05 0:34 ` [Bug c++/98150] " ndkrempel at gmail dot com
@ 2020-12-05 0:51 ` ndkrempel at gmail dot com
2021-08-03 6:04 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ndkrempel at gmail dot com @ 2020-12-05 0:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98150
--- Comment #2 from Nick Krempel <ndkrempel at gmail dot com> ---
Realised it doesn't need C++20 and was able to repro back in gcc 6.1 too.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/98150] Segfault from statement expression in lambda noexcept
2020-12-05 0:18 [Bug c++/98150] New: Segfault from statement expression in lambda noexcept ndkrempel at gmail dot com
2020-12-05 0:34 ` [Bug c++/98150] " ndkrempel at gmail dot com
2020-12-05 0:51 ` ndkrempel at gmail dot com
@ 2021-08-03 6:04 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-03 6:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98150
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-08-03
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-03 6:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 0:18 [Bug c++/98150] New: Segfault from statement expression in lambda noexcept ndkrempel at gmail dot com
2020-12-05 0:34 ` [Bug c++/98150] " ndkrempel at gmail dot com
2020-12-05 0:51 ` ndkrempel at gmail dot com
2021-08-03 6:04 ` 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).