Commit Message

Recently, I came across PR 44646, where I wrote a bit more than a year
ago: "I have an embryonic patch for it". Well, I found it again, did
some polishing - and here it is.
This patch implements the parsing/diagnostic for "DO[,] CONCURRENT
for-all-header", e.g.
do concurrent (i = 1:5)
A(i) = B(i)
end do
DO CONCURRENT allows the compiler to go through the loop in any order
and also in parallel; some constraints help to avoid dependencies, but
it is the duty of the programmer to ensure that the order does not
matter. That's one difference to the FORALL construct; another is that
one is allow to do much more in the DO CONCURRENT block than FORALL
allows: Other loops, conditional jumps, ...
TODO as follow up:
- Replace "Sorry" by a real implementation in trans-stmt.c
- Add documentation to gfc-internal.texi, update gfortran.texi (F2003
status) and the wiki
- Try to make use of the constraints for the middle end (optimization,
autoparallelization), if possible.
- Optionally (-fdo-concurrent=...?), parallelize the loop (e.g. by
adding OpenMP pragmas).
Build and regtested on x86-64-linux.
OK for the trunk?
Tobias