RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / used_types_17.f90
blob6cbfa6a4eb4f6d2ccfaa0a8dc5f6326abd9a4bef
1 ! { dg-do compile }
2 ! Tests the fix for PR31630, in which the association of the argument
3 ! of 'cmp' did not work.
5 ! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7 module box_module
8 type box
9 integer :: m = 0
10 end type box
11 end module box_module
13 module sort_box_module
14 contains
16 subroutine heapsort_box(cmp)
17 interface
18 subroutine cmp(a)
19 use box_module
20 type(box) :: a
21 end subroutine cmp
22 end interface
23 optional :: cmp
24 end subroutine heapsort_box
26 end module sort_box_module
29 module boxarray_module
30 use box_module
31 implicit none
33 type boxarray
34 type(box), allocatable :: bxs(:)
35 end type boxarray
36 contains
38 subroutine boxarray_build_l(ba)
39 type(boxarray) :: ba
40 allocate(ba%bxs(1))
41 end subroutine boxarray_build_l
43 subroutine boxarray_sort()
44 use sort_box_module
45 call heapsort_box
46 end subroutine boxarray_sort
48 end module boxarray_module