[Bug middle-end/68516] ICE: OpenMP with simd collapse
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 4 14:47:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68516
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is not valid OpenMP, GCC trunk properly rejects it:
pr68516.c: In function ‘main’:
pr68516.c:7:23: error: initializer expression refers to iteration variable ‘i’
for (int k = a[i]; k < 0; k++) {
~^~~
As it is just ICE on invalid, not going to backport the fixes (which are
related to the OpenMP 4.5 wording that simplified this anyway).
The OpenMP 4.0 rule is:
"The iteration count for each associated loop is computed before entry to the
outermost loop. If execution of any associated loop changes any of the values
used to compute any of the iteration counts, then the behavior is unspecified."
Marking as fixed in GCC 6+.
More information about the Gcc-bugs
mailing list