2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_57.f90
blob8104338672bee65638876db28fdbf3c12b3f1eed
1 ! { dg-do compile }
3 ! PR 59502: [OOP] ICE on invalid on pointer assignment to non-pointer CLASS
5 ! Contributed by Andrew Benson <abensonca@gmail.com>
7 implicit none
9 type :: d
10 end type
12 type :: p
13 class(d) :: cc ! { dg-error "must be allocatable or pointer" }
14 end type
16 contains
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
24 end