aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/class_52.f90
blob: 33c03729e0205b92090f6cd0b43812ef879155ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
! { dg-do compile }
! { dg-options "-std=f2003" }
!
! PR fortran/52270
!
! From IR F08/0073 by Malcolm Cohen
!

  Program m013
    Type t
      Real c
    End Type
    Type(t),Target :: x
    Call sub(x) ! { dg-error "Fortran 2008: Non-pointer actual argument" }
    Print *,x%c
    if (x%c /= 3) STOP 1
  Contains
    Subroutine sub(p)
      Class(t),Pointer,Intent(In) :: p
      p%c = 3
    End Subroutine
  End Program