c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_array_10.f03
blob9eb3ef71814376a50205e0f613d14abf0591c119
1 ! { dg-do compile }
3 ! PR fortran/41587
4 ! This program was leading to an ICE related to class allocatable arrays
6 ! Contributed by Dominique D'Humieres <dominiq@lps.ens.fr>
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