ieee_9.f90: XFAIL on arm*-*-gnueabi[hf].
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_pass_1.f90
blob5678be6f8784ead434edae4af633fa27b85da3bd
1 ! { dg-do run }
3 ! PR 39630: [F03] Procedure Pointer Components with PASS
5 ! found at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/4a827e8ced6efb0f/884b9eca6d7e6742
7 module mymod
9 type :: mytype
10 integer :: i
11 procedure(set_int_value), pointer :: seti
12 end type
14 abstract interface
15 subroutine set_int_value(this,i)
16 import
17 class(mytype), intent(inout) :: this
18 integer, intent(in) :: i
19 end subroutine set_int_value
20 end interface
22 contains
24 subroutine seti_proc(this,i)
25 class(mytype), intent(inout) :: this
26 integer, intent(in) :: i
27 this%i=i
28 end subroutine seti_proc
30 end module mymod
32 program Test_03
33 use mymod
34 implicit none
36 type(mytype) :: m
38 m%i = 44
39 m%seti => seti_proc
41 call m%seti(6)
43 if (m%i/=6) STOP 1
45 end program Test_03