https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117130
Bug ID: 117130 Summary: internal compiler error: in add_stmt, at cp/semantics.cc:551 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/qM3dnM193 The following program: ``` constexpr auto x = [] (auto F) { return F(); }; _Alignof(const auto); static_assert(x([]() { return 1; }) == 1); ``` will trigger segmentation fault for gcc trunk. Stack dump: ``` 0x2867155 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x287af35 internal_error(char const*, ...) ???:0 0xa8c71a fancy_abort(char const*, int, char const*) ???:0 0xd1fb24 finish_static_assert(tree_node*, tree_node*, unsigned int, bool, bool) ???:0 0xc9a3aa c_parse_file() ???:0 0xdf1f69 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1 ```