f771 assertion failure
Toon Moene
toon@moene.indiv.nluug.nl
Sun Sep 28 03:22:00 GMT 1997
Richard Henderson:
>> >but don't know enough about Fortran to know what the implications
>> >are. What actually happens? The subroutine gets fed bad data?
>> >Something similar to c++'s non-const-reference, which gets fed
>> >the address of a temporary?
Craig:
>> Have you tried "info -f g77 M GLOBALS"? It *should* answer these
>> questions -- let us know if it doesn't.
Richard:
> It tells me to use -fno-globals, which is a cookbook
> answer to get rid of the warning, but does not help me
> understand the consequences of ignoring the warning --
> what happens to the bits? Does some data conversion take
> place? Since Fortran passes by reference (always?),
> where does the (new?) data get put, on the stack? Or
> does the called function see the bits of the FP number
> as an integer?
The latter. It might not be harmful, iff the routine does nothing
else but using it as internal work space (i.e. it doesn't _read_
anything stored in the array before initialising it itself).
In the old days, library routines (like this one - from the name
only I'd guess it computes a Fast Fourier Transform) often requested
some work space from their callers, because Fortran 77 doesn't
allow the routine itself to allocate a temporary array whose extent
is a function of the problem size as passed by the caller. Nowadays
we have (Fortran 90) automatic arrays, which solve this problem [
BTW, g77 also supports these ]
I do agree with Richard that the explanation info -f g77 M GLOBALS
gives might be hard to understand for non-Fortraners.
HTH,
Toon.
More information about the Gcc
mailing list