This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/24369] New: segmentation fault with gfortran


Using Debian, sid

$uname -a
Linux kusumanchi 2.6.12-1-686-smp #1 SMP Tue Sep 27 13:10:31 JST 2005
i686 GNU/Linux

$gfortran -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
--enable-mpfr --disable-werror --enable-checking=release
i486-linux-gnu
Thread model: posix
gcc version 4.0.2 (Debian 4.0.2-2)

$cat gfortran_bug.f90
module variables
 implicit none
 integer, parameter :: NX = 32
 real :: xco(0:NX)

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 module variables


!------------------------------------------------------------------------------

program testsuite
 use variables
 xco = func2(NX)
end program testsuite



$gfortran gfortran_bug.f90

$./a.out
Segmentation fault


I first reported the problem at
http://gcc.gnu.org/ml/fortran/2005-10/msg00277.html from which I gather that
this is not a problem with 4.1.0 20051010 (experimental) version. I am
wondering if it could be fixed in 4.0.2 as well.

thanks
raju


-- 
           Summary: segmentation fault with gfortran
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kamaraju at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24369


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]