https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88869
Bug ID: 88869 Summary: ICE (Segmentation Fault) when using lambda Product: gcc Version: 8.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: daniel at hebirobotics dot com Target Milestone: --- I found a bug when trying to pass a lambda to a structure which holds the lambda along with some additional state. I haven't had time to simply my repro to see where the code begins to "break," but a segmentation fault is clearly an indication of something going wrong within the compiler. Clang seems to compile the godbolt link which GCC struggles with below. While the version I specified is `8.2.1`, I am not entirely sure which versions this can be reproduced on. I originally found it on my Fedora 29 machine running `gcc (GCC) 8.2.1 20181215 (Red Hat 8.2.1-6)`, but it also appears to be reproducible on the `gcc (trunk)` version from Matt Godbolt's website (gcc.godbolt.org) as of 15 January 2019. I have attached a simplified version of the code I found this bug in here: https://gcc.godbolt.org/z/4LQb4j