gfortran bug?
Ray Nachlinger
ray@ultramarine.com
Wed Dec 6 21:17:00 GMT 2006
On Wed, 6 Dec 2006, Steve Kargl wrote:
> On Wed, Dec 06, 2006 at 09:55:04PM +0100, Daniel Franke wrote:
> > On Wednesday 06 December 2006 21:24, Ray Nachlinger wrote:
> > $> gfortran-svn -g -Wall ray.f90 && ./a.out
> > T T T T T
> > T T T T T
> > T T T T T
> > Segmentation fault
>
> The output is probably going to OS dependent (big vs. little
> endian) and compiler dependent.
>
> > call repeat(.true., len_l, n, l(1))
>
> The first 2 bytes of the internal representation of .true.
> do not need to be the same as the last 2 bytes. .true.
> can be any of the 2**32 bit patterns.
>
> There are other problems such as the above (with consideration
> of call by reference) provides the address for the scalar .true.,
> which is 4 bytes. The repeat routine is doing 10 assignments
> of 2 bytes each that start with the address of .true.. The
> following 16 bytes can be garbage.
>
The real problem is that the code I sent did not do what
I said it did. The repeat subroutine was correct, but the
calls to it reversed the "length" and number arguments.
So sorry,
Ray
More information about the Fortran
mailing list