https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115904
Bug ID: 115904
Summary: C++ 20, Lambda type template instantiated inside a
class template method leads to crash
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: shrike4625 at gmail dot com
Target Milestone: ---
Created attachment 58651
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58651&action=edit
Code that crashes with .ii and .s files
A (seemingly) valid C++ 20 code leads to a runtime crash: illegal instruction
or segfault.
The code instantiates a Lambda type template inside a class template method.
Any significant change to the code (remove template from one of the types,
change lambda to functor etc.) remove the crash. If stupid_getter() is a
non-static method, there is still crash.
The sanitizer incorrectly reports
"min_code.cpp:13:17: runtime error: execution reached the end of a
value-returning function without returning a value".
Ubuntu 24.04.
Crash on g++ 13.2.0 (illegal instruction), and also on g++ 12.3.0 (segfault)