1! { dg-do compile }
2!
3! PR 59502: [OOP] ICE on invalid on pointer assignment to non-pointer CLASS
4!
5! Contributed by Andrew Benson <abensonca@gmail.com>
6
7  implicit none
8
9  type :: d
10  end type
11
12  type :: p
13    class(d) :: cc   ! { dg-error "must be allocatable or pointer" }
14  end type
15
16contains
17
18  function pc(pd)
19    type(p) :: pc
20    class(d), intent(in), target :: pd
21    pc%cc => pd   ! { dg-error "is not a member of" }
22  end function
23
24end
25