https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110242
Bug ID: 110242 Summary: ICE on valid (decltype with lambda) Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: stevenxia990430 at gmail dot com Target Milestone: --- The following program reports an internal compiler error: error reporting routines re-entered. To quickly reproduce: https://gcc.godbolt.org/z/h4aG89rWT ``` #include <tuple> template <typename Tuple> auto foo(const Tuple& t) -> decltype(([](auto&&... xs){return 0;})){ } int main(){ const std::tuple<int> t{1}; return foo([](){ return 0;})(t); } ``` Note that this code when tested on clang-trunk successfully compiles.