Is there a PR open for this code?
jdelia@intec.unl.edu.ar
jdelia@intec.unl.edu.ar
Thu Sep 11 12:48:00 GMT 2008
Dominique Dhumieres <dominiq@lps.ens.fr> ha escrito:
> Is there a PR open for for he following code?
>
> program no_leak
> real, dimension(100) :: x, y
> x=(/(i, i=1, n)/)
^
a question: where "n" was defined?
> y(:size(compact(x))) = compact(x)**2
> print *, y(100)
> contains
> function compact(x)
> real,allocatable,dimension(:) :: compact
> real,dimension(:),intent(in) :: x
> integer :: n
> n = size(x)
> allocate(compact(n))
> end function compact
> end
>
> It always compiles, but half of the time (depending on the build)
> the executable
> gives a "Bus error" (on Darwin). I am sure to have borrowed this
> code somewhere,
> but I cannot remember where.
>
> TIA
>
> Dominique
Regards,
Jorge.
--
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Fortran
mailing list