http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50564
--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-10-08
21:41:11 UTC ---
FORALL sucks rocks through a straw.
We cannot use the usual front-end optimization within forall, because
forall(iTime=1:2)
tmp = dble(iTime)
timeSteps(iTime)=ratio**(tmp-0.5d0)-ratio**(tmp-1.5d0)
end forall
doesn't work (gfortran correctly warns about multiple assignments to tmp).
So, the best method is to disable front-end optimization within
a forall loop.
I assume the same holds for DO CONCURRENT.