use_12.f90

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

F90
26
字号
! { dg-do compile }! Tests the fix of PR34545, in which the 'numclusters' that determines the size! of fnres was not properly associated.!! Reported by Jon D. Richards <jon_d_r@msn.com>!module m1  integer :: numclusters = 2end module m1module m2  contains    function get_nfirst( ) result(fnres)      use m1, only: numclusters      real :: fnres(numclusters)   ! change to REAL and it works!!      end function get_nfirstend module m2program kmeans_driver   use m1   use m2   integer :: nfirst(3)   nfirst(1:numclusters) = get_nfirst( )end program kmeans_driver! { dg-final { cleanup-modules "m1 m2" } }

⌨️ 快捷键说明

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