This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran, OOP] PR 52552: ICE when trying to allocate non-allocatable object giving a dynamic type
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 8 Jun 2012 09:44:10 -0700
- Subject: Re: [Patch, Fortran, OOP] PR 52552: ICE when trying to allocate non-allocatable object giving a dynamic type
- References: <CAKwh3qh6rAySJbcLeOxPEBFzSq4bY1w3mmb0VGWtYqg4L+AnBg@mail.gmail.com>
On Fri, Jun 08, 2012 at 12:40:10PM +0200, Janus Weil wrote:
>
> [Side note: The piece of code which I'm moving contains a FIXME
> comment, which I don't quite understand, so I'm not sure whether it is
> still valid. It was added by Steve in
> http://gcc.gnu.org/viewcvs?view=revision&revision=145331. Does anyone
> have an opinion on this?]
>
It's been too long! I believe Tobias is
right that the FIXME had to do allocatable
components and a walking one or more
link list.
troutmask:sgk[207] gfc4x -o z foo.f90
troutmask:sgk[208] ./z
Bus error (core dumped)
program foo
type bah
real, allocatable :: x(:)
end type bah
type bar
integer, allocatable :: i(:)
type(bah), allocatable :: z(:)
end type bar
type(bar), allocatable :: a(:)
allocate(a(2)) ! Should be ok
allocate(a(1)%z(1)%x(42)) ! a(1)%z(1) not allocated, no error
end program foo
--
Steve