g77 does not allow you to define an equivalence after DATA statements. here is a reduced example:
INTEGER*4 DEBUGidx PARAMETER (DEBUGidx = 1) INTEGER*4 MAPelements PARAMETER (MAPelements = 262) INTEGER*4 MAPlevel(0:MAPelements-1) DATA MAPlevel ( 0) / 5/ EQUIVALENCE (DEBUGlevel, MAPlevel(DEBUGidx)) END Move the DATA statements after the equivalence and it will compile. g77 is no longer supported. the replacement fortran compiler, gfortran, compiles your example code without error. upgrading to gfortran might be an option. gfortran is available with versions of gcc > 4.0, with the caveat that 4.0 is beta and 4.2 is very usable. since g77 is no longer in active development; you have a couple of options: first, if you are willing to maintain your own version of g77, you can change g77 to work the way you want. source is available in many places. second, and probably simpler, is to write a script which pre-processes the include files to get things in the correct order. from your example, the logic would be very simple...copy from input to output all statements except DATA, save all the DATA in a list and write them after the input file is completely read. HTH, Bud Davis