https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98391
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yes, of course, it is racy, different iterations access/modify c(i,j) and so
they aren't independent.
What one can do is e.g. swap the do k = 1, n and do i = 1, n lines and change
collapse from 3 to 2, then it is valid.