Automatic object of parameterized derived type

I checked the Cray/HPE compiler - also compiled the module with no message. As an aside, the “must not have the SAVE attribute or be a variable declare in the main program” does not make much sense since a variable declared in the main program automatically has the SAVE attribute. Text from the standard:

“A variable, common block, or procedure pointer declared in the scoping unit of a main program, module, or submodule implicitly has the SAVE attribute, …”

"An automatic data object is a nondummy data object with a type parameter or array bound that depends on the value of a specification-expr that is not a constant expression.

C814 An automatic data object shall not have the SAVE attribute."

2 Likes