We’re still trying to figure out what we’re going to do with DO CONCURRENT in f18 (flang). I wrote a short documentation file to describe its basic problem: a programmer writing parallel code with DO CONCURRENT may not enjoy parallel execution because the standard imposes weaker requirements on the body of DO CONCURRENT that suffice only to allow safe serial execution of iterations in arbitrary order, and a compiler can assume only that those weaker requirements have been respected and thus has no general way to know that concurrency is safe – even when the programmer knows that it is.
Please let me know where the note can be made more clear, correct or complete. I’m trying to summarize the problems in one place in the source base to which we can direct new users in the future when they need to know why DO CONCURRENT isn’t working as one might expect. If you have LLVM reviewing permissions, you can comment in place if you like. Thanks!