This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

equivalence croakage


Folks,

just trying to make the switch from g77 to gfortran (and from gcc3 to gcc4).
When compiling some legacy f77 code that uses f77 equivalence statements, I get barfed at with the following (32bit environment):


<During initialization>

Error: Overlapping unequal initializers in EQUIVALENCE at (1)

Doesn't tell at all where the shit is happening.

This code happens to compile with various f77 compilers (aix xlf, g77).

I collected all the equivalence statements from the offending f77 source (all more or less variations of the same theme):

      subroutine dud
      IMPLICIT NONE
      Character cDummy(8)/8*' '/, CSTORE(8)/8*' '/, CSTORE1(8)/8*' '/
      Integer   iDummy(2), ISTORE(2), ISTORE1(2)
      Real*8    rDummy(1), XSTORE

      Equivalence(CSTORE(1),XSTORE,ISTORE)
      Equivalence(CSTORE1(1),ISTORE1)
      Equivalence(cDummy(1), iDummy(1), rDummy(1))

end

this just happens to compile w/o a problem.

Am I being kicked by a gfortran bug?

Thx.,
H.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]