2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_57.f90
blob7256dfc4d2956f77b061e91513b1b2286969e46e
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 "Non-POINTER in pointer association context" }
22 end function
24 end