https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127505

--- Comment #4 from Simon Martin <simartin at gcc dot gnu.org> ---
Slightly reduced:

==
auto foo() {
  struct S {};
  return S{};
}

void bar() { auto a = foo(); } // <= This ICEs

// Those do not
// void bar() { const auto& a = foo(); }
// auto bar() { return decltype(foo()){}; }
// void baz() { decltype(foo()){}; }
// auto a = decltype(foo()){};

struct S {
} s;
==

Reply via email to