John C: EQUIVALENCE was used in old codes, and compilers continue to support it even though it is now marked 'obsolescent' along with COMMON. What is not allowed by the standard is declaring EQUIVALENCE of a module variable in a declaration placed outside the module.
FTN95 simply failed to catch the error in the particular code that I stumbled upon. Here is another short code that appears very similar, but for this example FTN95 does issue an error message and that message is direct and clear.
module mymod
integer ij(10)
end module
program myprog
use mymod
integer pq(5,2)
equivalence (pq,ij)
!
call addi(pq,10)
print *,ij
end program
The compiler says
0008) equivalence (pq,ij)
*** Module variable IJ should not be equivalenced outside of its module
1 ERROR [<MYPROG> FTN95 v8.64.0]
*** Compilation failed
If there is a case where the forbidden use of EQUIVALENCE provides an otherwise unobtainable solution, we could welcome its support as an extension. I have yet to see one.
In this example, I started with an old Fortran IV/ Fortran 77 code, and attempted to consolidate prolific repetitions of lengthy COMMON blocks into shared declarations placed inside modules. I did not notice the conflict that would be produced by moving COMMON variables into modules and leaving the EQUIVALENCEs outside until I used another compiler than FTN95.
Modules help reduce data exposure to parts of code where that data should not be touched. EQUIVALENCE goes in the opposite direction. Therefore, mixing modules and EQUIVALENCE is a short cut to a mess if there are no restricting rules, either imposed by the standard or self-imposed, to prevent the mess.