aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/class_51.f90
blob: 1fdad92dd04e53e55a77bffd32332f7bfb15e072 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
!
! 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)
    Print *,x%c
    if (x%c /= 3) call abort ()
  Contains
    Subroutine sub(p)
      Class(t),Pointer,Intent(In) :: p
      p%c = 3
    End Subroutine
  End Program

! { dg-final { scan-tree-dump-times "sub \\(&class" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }