Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gfortran.dg / class_array_10.f03
1 ! { dg-do compile }
2 !
3 ! PR fortran/41587
4 ! This program was leading to an ICE related to class allocatable arrays
5 !
6 ! Contributed by Dominique D'Humieres <dominiq@lps.ens.fr>
7
8 type t0
9   integer :: j = 42
10 end type t0
11 type t
12   integer :: i
13   class(t0), allocatable :: foo(:)
14 end type t
15 type(t) :: k
16 allocate(t0 :: k%foo(3))
17 print *, k%foo%j
18 end