RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / typebound_call_10.f03
blob22a2a72ba68f9e33fcc06a4fa027c00733542cb4
1 ! { dg-do run }
3 ! PR 39630: [F03] Procedure Pointer Components with PASS
5 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
7 module m
9  type :: t
10   integer :: i
11  contains
12   procedure, pass(y) :: foo
13  end type t
15 contains
17  subroutine foo(x,y)
18   type(t),optional :: x
19   class(t) :: y
20   if(present(x)) then
21     print *, 'foo', x%i, y%i
22   else
23     print *, 'foo', y%i
24   end if
25  end subroutine foo
27 end module m
29 use m
30 type(t) :: t1, t2
31 t1%i = 3
32 t2%i = 4
33 call t1%foo()
34 call t2%foo()
35 call t1%foo(t2)
36 end