lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_intent_4.f90
blob74bb2874dca8e004a56fa5ef32f250ec4f5ef092
1 ! { dg-do run }
2 ! { dg-options "-fno-inline" }
4 ! PR fortran/46937
6 ! Check that a non-pointer INTENT(IN) dummy
7 ! with pointer component is properly treated
9 program test
10 type myT
11 integer, pointer :: point
12 end type myT
13 type(myT) :: t2
14 allocate(t2%point)
15 t2%point = 42
16 call nonpointer(t2)
17 if(t2%point /= 7) STOP 1
18 t2%point = 42
19 call nonpointer2(t2)
20 if(t2%point /= 66) STOP 2
21 contains
22 subroutine nonpointer(t)
23 type(myT), intent(in) :: t
24 t%point = 7
25 end subroutine nonpointer
26 subroutine nonpointer2(t)
27 class(myT), intent(in) :: t
28 t%point = 66
29 end subroutine nonpointer2
30 end program