[Bug c/100661] [11/12 Regression] ICE in omp-low.c / refs_may_alias_p_2, at tree-ssa-alias.c:2460
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 20 13:41:29 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100661
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can lambdas appear inside #pragma omp in C++? The following is accepted but
each thread seems to get the global 'c', but at least we don't ICE (possibly
because frame lowering is done in the FE).
void
foo (char **x)
{
#pragma omp parallel for
for (int i = 0; i < 16; i++)
{
char c[50];
__builtin_strcpy (c, x[i]);
auto x = [&] () { __builtin_strcat (c, "foo"); };
x();
}
}
More information about the Gcc-bugs
mailing list