https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117535
Bug ID: 117535
Summary: Segmentation fault signal terminated program cc1plus
with recursive lambda
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yihan4845 at gmail dot com
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/3vazW8dq9
The following program:
```cpp
template<typename T> void f(T a, int = f([] {}));
void g() { f(0); }
```
will trigger segmentation fault for gcc trunk.
Stack dump:
```
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 4
```