I make use of equivalence rarely, usually to work around some issue with data typing, or trying to use a logical for a %rb. The code snippet below compiles perfectly, but the execution shows that the EQUIVALENCE is not in force.
logical record_function_enabled,playback_function_enabled
integer record_fileunit,playback_fileunit
equivalence (record_function_enabled, record_fileunit),(playback_function_enabled, playback_fileunit)
common/record_playback_common/record_function_enabled,playback_function_enabled,record_fileunit,playback_fileunit
print *,loc(record_function_enabled),loc(record_fileunit)
end
The LOC of these two variables should be the same, but they are not.