https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84576
Bug ID: 84576 Summary: g++: internal compiler error: Segmentation fault (program cc1plus) Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vegard.nossum at gmail dot com Target Milestone: --- The following is obviously not a valid C++ program but crashes the compiler: a(){[](class{ Output: <source>:1:3: error: ISO C++ forbids declaration of 'a' with no type [-fpermissive] a(){[](class{ ^ <source>: In function 'int a()': <source>:1:13: error: types may not be defined in parameter types a(){[](class{ ^ <source>:1:13: error: expected '}' at end of input <source>:1:13: error: expected ',' or '...' at end of input <source>:1:13: error: expected ')' at end of input g++: internal compiler error: Segmentation fault (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 4 I used C-Reduce on a bigger program to find a smaller test case.