used_types_17.f90

来自「用于进行gcc测试」· F90 代码 · 共 51 行

F90
51
字号
! { dg do-compile }! Tests the fix for PR31630, in which the association of the argument! of 'cmp' did not work.!! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>!module box_module  type box    integer :: m = 0  end type boxend module box_modulemodule sort_box_modulecontains  subroutine heapsort_box(cmp)    interface       subroutine cmp(a)         use box_module         type(box) :: a       end subroutine cmp    end interface    optional :: cmp  end subroutine heapsort_boxend module sort_box_modulemodule boxarray_module  use box_module  implicit none  type boxarray    type(box), allocatable :: bxs(:)  end type boxarraycontains  subroutine boxarray_build_l(ba)    type(boxarray) :: ba    allocate(ba%bxs(1))  end subroutine boxarray_build_l  subroutine boxarray_sort()    use sort_box_module    call heapsort_box  end subroutine boxarray_sortend module boxarray_module! { dg-final { cleanup-modules "box_module sort_box_module boxarray_module" } }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?