This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
equivalence croakage
- From: Hans Horn <hannes at 2horns dot com>
- To: fortran at gcc dot gnu dot org
- Date: Sun, 01 Nov 2009 11:53:58 -0800
- Subject: 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.