equivalence really broken :-)
Jakub Jelinek
jakub@redhat.com
Fri Oct 14 17:13:00 GMT 2005
On Fri, Oct 14, 2005 at 04:56:06PM +0200, Fran?ois-Xavier Coudert wrote:
> Well, Paul Thomas sent me the attached file (Polyhedron Benchmark
> Tests), which does segfault at execution with current CVS gfortran.
> The segfault doesn't happen any more if pool and pool3 are not
> equivalenced any more, but initialized separately (remove the
> equivalence and add "CALL RANDOM_NUMBER(pool3)" just after "CALL
> RANDOM_NUMBER(pool)").
>
> Using nightly builds on i686-linux, the segfault appeared between
> 20051012 and 20051013. I don't have time to reduce it any further, but
> here it is.
Yeah, I can reproduce it. Smaller testcase:
integer, dimension (8388608) :: i, j, k
integer :: t
equivalence (i(1), j(10))
i = 5
k = i
call foo (k)
t = sum (k - i)
write (*, fmt='(i10)') t
contains
subroutine foo (x)
integer, dimension (8388608) :: x
x = 6
end subroutine
end
It seems GCC decides to create some huge artifical temporaries
(not the vars created in trans-common.c) and if you don't have sufficiently
high ulimit -s, you will run out of stack. Will look into this.
Jakub
More information about the Fortran
mailing list