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

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
This is a latent issue, and r14-2170 just made it affect variable templates as
well.

Here's a version of the testcase that uses a class instead of variable template
that we always ICEd on:

template <typename> struct zero_t { };
template <auto> struct Type;

template<class T>
auto outer(T) {
  using inner = Type<[](auto) {}>;
  return [](auto) { return zero_t<inner>{}; }(0);
}

int main() { outer(0); }


To fix this I think we need to make dependent_opaque_alias_p return true
whenever the aliased type contains a lambda subexpression, such as with the
alias 'inner'.

Reply via email to