https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69741
Harald Anlauf <anlauf at gmx dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gmx dot de --- Comment #3 from Harald Anlauf <anlauf at gmx dot de> --- (In reply to Dominique d'Humieres from comment #1) > Confirmed from 4.8 up to trunk (6.0). I don't see why the code should be > invalid. Sunf95 rejects it with: forall (ii(1)=1:3 , ii(2)=1:2) ^ "pr69741.f90", Line = 5, Column = 13: ERROR: The index-name in a FORALL header must be a named scalar variable of type INTEGER. ^ "pr69741.f90", Line = 5, Column = 25: ERROR: The index-name in a FORALL header must be a named scalar variable of type INTEGER. F2008 has: R751 forall-construct-stmt is [forall-construct-name :] FORALL concurrent-header The scope and attributes of an index-name in a concurrent-header in a FORALL construct or statement are described in 16.4. 16.4, par.5: The name of a variable that appears as an index-name in a DO CONCURRENT construct, FORALL statement, or FORALL construct has a scope of the statement or construct. It is a scalar variable. Thus invalid.