G77 run-time failure on hydro test program, SPARC Solaris

craig@jcb-sc.com craig@jcb-sc.com
Sun Feb 28 23:30:00 GMT 1999


>>>>>> "DH" == David G Hough at validgh <validgh@validgh.com> writes:
>
> DH> The fifth parameter X is defined in common as one-dimensional,
> DH> and in SRCHDF as two dimensional, and the wrong address gets passed,
> DH> I think.    This usage may be nonstandard but is quite common.
>
>The problem is with an actual scalar arg and array dummy arg, isn't
>it?  After the gdb fact, ftnchek complains variously and NAG f90
>rejects the program.  I hope this isn't destined for SPEC or something :-/.

Still, I'll try and look into that sometime, as I begin to take
items off of my (still-filling) queue.  IIRC, g77 would treat even
the passing of FOO(1) the same as if FOO itself was passed, so
it shouldn't matter.

It occurs to me, though, that perhaps there's a problem with attempted
inlining here.  The back end might be getting confused, if that's the
case.

One way to check that is to compile with `-Wno-globals -fno-globals',
or whatever (read the docs ;-).

If that fixes the problem, then g77 needs to either diagnose the
incompatible calling sequence (so the bad code generation doesn't
get exposed by an apparently successful compile) or, if it's not
actually wrong to do that, properly translate the code into the
form the back end wants so the back end can cope.

(Of course, there *could* just be a back-end bug here, that's another
possibility.  And it's possible that those options don't really
work around the problem I'm talking about, but do happen to work
around some other bug.)

Again, I do hope to look into this later, but more info would be
appreciated.

        tq vm, (burley)



More information about the Gcc-bugs mailing list