summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/associate_52.f90
blob: c24ec4b8f6a021bc3c3aed15920c442ef98e21e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! { dg-do compile }
!
! PR fortran/93427
!
! Contributed by Andrew Benson
!
module a

type :: t
end type t

contains

recursive function b()
  class(t), pointer :: b
  type(t) :: c
  allocate(t :: b)
  select type (b)
  type is (t)
     b=c
  end select
end function b

end module a