This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41587] [OOP] ICE with ALLOCATABLE CLASS components
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Oct 2009 08:42:47 -0000
- Subject: [Bug fortran/41587] [OOP] ICE with ALLOCATABLE CLASS components
- References: <bug-41587-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from dominiq at lps dot ens dot fr 2009-10-14 08:42 -------
I don't get an ICE with the coed in comment#0. However I get one with the
following (valid?) changes:
type t0
integer :: j = 42
end type t0
type t
integer :: i
class(t0), allocatable :: foo(:)
end type t
type(t) :: k
allocate(t0 :: k%foo(3))
print *, k%foo%j
end
pr41587_db.f90: In function 'MAIN__':
pr41587_db.f90:9:0: internal compiler error: in gfc_conv_descriptor_data_get,
at fortran/trans-array.c:147
Note that with the patch in http://gcc.gnu.org/ml/fortran/2009-10/msg00136.html
, I get the following error for the code in comment#0:
pr41587.f90:6.34:
class(t0), allocatable :: foo(3)
1
Error: Allocatable component of structure at (1) must have a deferred shape
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41587