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]

Re: equivalence croakage


Hans Horn wrote:

      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.


It's somewhat surprising that you could compile this stuff with multiple f77 compilers. Not all f77 compilers support all the non-standard extensions
(1) real*8
(2) EQUIVALENCE of character and non-character data types
(3) initialization in declaration under f77
So, what you have shown here are not f77 equivalence. Surely, gfortran should complain if you turned on standards checking.


The notations Error: ....... at (1) generally refer to a previous attempt to quote a source line and follow it with a line containing 1 in the same column as the referenced problem.


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