2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_52.f90
blob42cb86db4a34338faae1be8ba8bb7242b17ad530
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
4 ! PR fortran/52270
6 ! From IR F08/0073 by Malcolm Cohen
9 Program m013
10 Type t
11 Real c
12 End Type
13 Type(t),Target :: x
14 Call sub(x) ! { dg-error "Fortran 2008: Non-pointer actual argument" }
15 Print *,x%c
16 if (x%c /= 3) call abort ()
17 Contains
18 Subroutine sub(p)
19 Class(t),Pointer,Intent(In) :: p
20 p%c = 3
21 End Subroutine
22 End Program