The program below is valid Fortran 77 code. FTN95 considers the array B to be a function and refuses to compile the code.
program tst
C
EQUIVALENCE (B(4),B3), (B(5),B4)
DIMENSION B(16)
b(4) = 10
b4 = 5.0
print *,b3,b(5)
end
Although elements of the array B appear in the equivalence statement before the declaration of B as an array, in general all the declarative statements in a program unit had to be read and processed together, given the limitations of that language (Fortran 77).
The old FTN77 compiler accepts the same code without quibbles.
A workaround is to move the DIMENSION statement up. In the bigger code where this issue arose, there are over 500 EQUIVALENCE statements in the 50,000 line program, so doing similar relocations of such lines would take quite a bit of work.