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

Reply via email to