This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
an ICE with allocate ?
Dear all,
The following test case gives me an ICE.
Cheers,
Jorge.
--
! $ cat /proc/version
! Linux version 2.6.27.30-170.2.82.fc10.i686
! (mockbuild@xenbuilder4.fedora.phx.redhat.com)
! (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) )
! #1 SMP Mon Aug 17 08:38:59 EDT 2009
!
! $ which gfortran
! /usr/local/gfortran/bin/gfortran
!
! $ gfortran --version
! GNU Fortran (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)
! Copyright (C) 2008 Free Software Foundation, Inc.
!
! $ gfortran -o is_a_ice.exe is_a_ice.f90
! is_a_ice.f90: In function 'is_a_ice':
! is_a_ice.f90:21: internal compiler error: Segmentation fault
! Please submit a full bug report,
! with preprocessed source if appropriate.
! See <http://bugzilla.redhat.com/bugzilla> for instructions.
!
program is_a_ice
integer, dimension (4) :: ier = 0
integer, dimension (:), allocatable :: a
integer :: n = 16
!allocate (a (n), stat = ier (1)) ! with this line it is OK
allocate (a (n), stat = ier) ! although this wrong user line
gives an ICE
print *, "allocated (a) : ", allocated (a)
end program is_a_ice
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
- References:
- [Patch, Fortran, F03] PR 40996: Allocatable Scalars
- Re: [Patch, Fortran, F03] PR 40996: Allocatable Scalars
- From: Paul Richard Thomas
- Re: [Patch, Fortran, F03] PR 40996: Allocatable Scalars
- Re: [Patch, Fortran, F03] PR 40996: Allocatable Scalars
- Re: [Patch, Fortran, F03] PR 40996: Allocatable Scalars
- Re: [Patch, Fortran, F03] PR 40996: Allocatable Scalars
- Re: [Patch, Fortran, F03] PR 40996: Allocatable Scalars
- Re: [Patch, Fortran, F03] PR 40996: Allocatable Scalars
- From: Paul Richard Thomas