https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83064
--- Comment #23 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #22) > It isn't just about compiler generated temporaries, you could e.g. have a > BLOCK construct inside of DO CONCURRENT and local variables in there, This would also be illegal. To quote F2008, 8.1.6.7: "The following additional restrictions apply to execution of a DO CONCURRENT construct. A variable that is referenced in an iteration shall either be previously defined during that iteration, or shall not be defined or become undefined during any other iteration. A variable that is defined or becomes undefined by more than one iteration becomes undefined when the loop terminates." In other words, DO CONCURRENT is a construct where we can parallelize no matter what, because if things that can go wrong they are the user's fault, unless, of course, we generate the variables in the compiler (front end or middle end or wherever). This includes > automatic variables in functions you inline. Of course, a few warnings for users who misunderstand the construct would also be nice... Looks more and more like a gcc 9 job to me - better to just disable the autoparallelization for gcc 8. for gcc-8