This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, Fortran] Derived type finalization: Already somewhat useable...
- From: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- To: fortran at gcc dot gnu dot org
- Date: Sat, 5 Jul 2008 10:52:16 +0200
- Subject: Re: [PATCH, Fortran] Derived type finalization: Already somewhat useable...
Hi Daniel,
I started playing around with finalize and saw that compiling the
following invalid program causes an ICE. (Actually, the program is
valid Fortran 2003, but gfortran does not yet support allocatable
scalars.)
type(t),allocatable :: x
1
Error: Scalar object 'x' at (1) may not be ALLOCATABLE
aa.f90:16.11:
allocate(x)
1
Error: Array specification required in ALLOCATE statement at (1)
aa.f90:10: internal compiler error: in gfc_finalize_expr, at
fortran/expr.c:3797
module m
type t
contains
final :: one
end type t
contains
subroutine one(x)
type(t) :: x
print *, 'one'
end subroutine one
end module m
use m
type(t),allocatable :: x
allocate(x)
end
Tobias