Here is what Intel says about the equivalence data descriptor.
Note the behavior under ‘strict’ standard adherence is to not
allow the equivalence of character and non-character types.
IntelÂ® Fortran lets you associate character and noncharacter entities, for example:
REAL reala, realb
EQUIVALENCE (reala, char1(1))
EQUIVALENCE (realb, char1(2))
EQUIVALENCE statements require only the first subscript of a multidimensional array (unless the STRICT compiler directive is in effect). For example, the array declaration var(3,3), var(4) could appear in an EQUIVALENCE statement. The reference is to the fourth element of the array (var(1,2)), not to the beginning of the fourth row or column.
If you use the STRICT directive, the following rules apply to the kinds of variables and arrays that you can associate:
â€¢If an EQUIVALENCE object is default integer, default real, double-precision real, default complex, default logical, or a sequenced derived type of all numeric or logical components, all objects in the EQUIVALENCE statement must be one of these types, though it is not necessary that they be the same type.
â€¢If an EQUIVALENCE object is default character or a sequenced derived type of all character components, all objects in the EQUIVALENCE statement must be one of these types. The lengths do not need to be the same.
â€¢If an EQUIVALENCE object is a sequenced derived type that is not purely numeric or purely character, all objects in the EQUIVALENCE statement must be the same derived type.
â€¢If an EQUIVALENCE object is an intrinsic type other than the default (for example, INTEGER(1)), all objects in the EQUIVALENCE statement must be the same type and kind.
So you have a choice. Restrict yourself to the compilers that support
this extension, or choose to code in a manner that works on all compilers. Our experience is that restricting the compilers you use
is not a good idea, and the amount of time to rework the code to
adhere to a standard is not as much as you think.