used_dummy_types_1.f90

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

F90
39
字号
! { dg-do run }! This checks the fix for PR20244 in which USE association! of derived types would cause an ICE, if the derived type! was also available by host association. This occurred ! because the backend declarations were different. !! Contributed by Paul Thomas  <pault@gcc.gnu.org>!==============module mtyp  type t1     integer::a  end type t1end module mtyp!==============module atest  use mtyp  type(t1)::zecontains  subroutine test(ze_in )    use mtyp    implicit none    type(t1)::ze_in    ze_in = ze  end subroutine test  subroutine init( )    implicit none    ze = t1 (42)  end subroutine initend module atest!==============  use atest  type(t1) :: res = t1 (0)  call init ()  call test (res)  if (res%a.ne.42) call abortend  ! { dg-final { cleanup-modules "mtyp atest" } }

⌨️ 快捷键说明

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