https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127559
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
void
foo (float *a)
{
#pragma omp target
{
auto b = [=] { a; };
auto c = [=] { b; };
}
}
on which it ICEs is roughly equivalent to hand-written
void
foo (float *a)
{
#pragma omp target
{
struct B { float *__a; void operator () () { __a; } };
B b;
b.__a = a;
struct C { B __b; void operator () () { __b; } };
C c;
c.__b = b;
}
}
There is no reason to map anything here except that a needs to be
firstprivatized when seeing it in b.__a = a; statement.