This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: equivalence croakage
On Sun, Nov 01, 2009 at 07:39:07PM -0800, Hans Horn wrote:
> >>
> >><During initialization>
> >>
> >>Error: Overlapping unequal initializers in EQUIVALENCE at (1)
> >>
> >>Doesn't tell at all where the shit is happening.
> >
> >Please show the complete error message.
> >Please show the actual code causing the problem.
> >Please report the version of gfortran that you are using.
> >Please report the options that you used.
> >
> >I doubt that it's a bug in gfortran. I suspect it's a
> >bug in your code because using equivalence correctly is
> >actually more difficult than it may appear.
> >
> >
>
> Steve,
>
> I was using gfortran v4.5 and this WAS the entire error message!
No, you did not show the entire error message. If it includes
a locus, ie., 'EQUIVALENCE at (1)', then a line of code was spit
out. That's part of the error message.
> commandline used:
> gfc -c -Wuninitialized -Wunused-label -fno-underscoring -fno-f2c
> -ffixed-line-length-132 -g -gstabs -O -march=pentium4 -pipe -x
> f77-cpp-input
>
This isn't the exact command line. There is no filename listed.
Drop the -fno-f2c. It's not needed because it's the default.
Add '-Wall -std=f95', and fix any problems. Why are you using
f77-cpp-input?
> When I remove the initialization of ISTORE/0/, it compiles - surprise.
>
> Would be nice to get an error message that tells what's wrong.
>
It would be nice if you actually wrote standard conforming Fortran.
--
Steve