https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92933
Bug ID: 92933 Summary: [coroutines] compiler ICE compiling coroutine with try/catch Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lewissbaker.opensource at gmail dot com Target Milestone: --- Created attachment 47490 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47490&action=edit Example program Compiling the attached program crashes the compiler with a segmentation fault when compiling with gcc coroutines branch. See https://godbolt.org/z/kCNVfQ This has a simple coroutine that looks like: struct some_error {}; task foo() { try { co_return; } catch (some_error) { } } Compilation with '-std=c++2a' crashes with the following error: <source>: In function 'task foo()': <source>:64:1: internal compiler error: Segmentation fault 64 | } | ^ Removing the try/catch compiles fine. Replacing the catch(some_error) with catch(...) compiles fine.