This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: segmentation fault with gfortran
- From: François-Xavier Coudert <fxcoudert at gmail dot com>
- To: Kamaraju Kusumanchi <kamaraju at gmail dot com>
- Cc: gfortran <fortran at gcc dot gnu dot org>
- Date: Thu, 13 Oct 2005 09:43:24 +0200
- Subject: Re: segmentation fault with gfortran
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=q+pHIOSe0TQgxnhNfGiLuZmiFo2yN8MKLuqKHAa4PKBN5uWccgDGPVpftyRQc1JNTBaQqi6wh6J7etxPEDILC40hWiKdilgC/3CL1QMko9fPkpFga3h4YC4r/+Kh0TqwYbFvwxKWZ95qx5f+lxyHJ/qVHrwzO7YT+k23KW9wQcA=
- References: <ba4975150510122307p73107754j5718223feb6d3228@mail.gmail.com>
On my i686-linux, your testcase doesn't segfault, but the following
(slightly reworked) does, on both 4.0 and mainline. I guess there's no
way we can reduce it any further. Can you file it in bugzilla?
program testsuite
real xco(2)
xco = func2(2)
contains
!------------------------------------------------------------------------------
function func1(N)
implicit none
real :: func1(0:N)
integer, intent(in) :: N
func1(:) = 1.0
end function func1
!------------------------------------------------------------------------------
function func2(N)
implicit none
real :: func2(0:N)
integer, intent(in) :: N
func2(:) = 1.0 + func1(N)
end function func2
end program testsuite