[Bug c++/102854] [OpenMP] Bogus "initializer expression refers to iteration variable" when using templates
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 21 16:42:46 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102854
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 51647
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51647&action=edit
gcc12-pr102854-wip.patch
WIP patch. Clearly still more work is needed, apparently pointer iterators
in non-rectangular loops are rejected, like:
void
foo ()
{
int a[1024];
int *p, *q;
#pragma omp parallel for collapse(2)
for (p = &a[0]; p < &a[512]; p++)
for (q = p + 64; q < p + 128; q++)
;
}
and enabling it result in ICEs during omp-expand.c. Furthermore, for both
pointer and random access iterator non-rect loops, I should verify we only
allow the var-outer, var-outer + a2, a2 + var-outer and var-outer - a2 forms
and no others and test code generation.
More information about the Gcc-bugs
mailing list