used_types_4.f90

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

F90
41
字号
! { dg-do compile }
! Tests the fix for PR28788, a regression in which an ICE was caused
! by the failure of derived type association for the arguments of
! InitRECFAST because the formal namespace derived types references
! were not being reassociated to the module.
!
! Contributed by Martin Reinecke  <martin@mpa-garching.mpg.de>  
! 
module Precision
  integer, parameter :: dl = KIND(1.d0)
end module Precision

module ModelParams
  use precision
  type CAMBparams
    real(dl)::omegab,h0,tcmb,yhe
  end type
  type (CAMBparams) :: CP
contains
  subroutine CAMBParams_Set(P)
    type(CAMBparams), intent(in) :: P
  end subroutine CAMBParams_Set
end module ModelParams

module TimeSteps
  use precision
  use ModelParams
end module TimeSteps

module ThermoData
  use TimeSteps
contains
  subroutine inithermo(taumin,taumax)
    use precision
    use ModelParams  ! Would ICE here
    real(dl) taumin,taumax
    call InitRECFAST(CP%omegab,CP%h0,CP%tcmb,CP%yhe)
  end subroutine inithermo
end module ThermoData
! { dg-final { cleanup-modules "PRECISION ModelParams TimeSteps ThermoData" } }

⌨️ 快捷键说明

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