j3-fortran / fortran_proposals

Proposals for the Fortran Standard Committee
175 stars 14 forks source link

`LOCAL_INIT()` semantics need to be defined in more detail #309

Open klausler opened 11 months ago

klausler commented 11 months ago

The standards state that a LOCAL_INIT() clause on DO CONCURRENT is a definition of the named construct entity, but neglect to specify exactly with what value the entity is being defined, or whether or not defined assignment may come into play. Maybe the LOCAL_INIT() construct entity is meant to be defined with the value of the variable of the same name in the enclosing scope, but as F'202X is written, I think that a compiler could define it with all zero bits on each iteration and still claim to conform.

Compilers that implement LOCAL_INIT() on derived type variables do not appear to apply defined assignments, which may or may not be correct.