used_dummy_types_2.f90

来自「linux下编程用 编译软件」· F90 代码 · 共 33 行

F90
33 行
字号
! { dg-do compile }! This tests that the fix for PR25391 also fixes PR20244. If! the USE mod1 in subroutine foo were deleted, the code would! compile fine.  With the USE statement, the compiler would! make new TYPEs for T1 and T2 and bomb out in fold-convert.! This is a slightly more elaborate test than! used_dummy_types_1.f90 and came from the PR.!! Contributed by Jakub Jelinek  <jakubcc.gnu.org>module mod1  type t1    real :: f1  end type t1  type t2    type(t1), pointer :: f2(:)    real, pointer :: f3(:,:)  end type t2end module mod1module mod2  use mod1  type(t1), pointer, save :: v(:)contains  subroutine foo (x)    use mod1    implicit none    type(t2) :: x    integer :: d    d = size (x%f3, 2)    v = x%f2(:)  end subroutine fooend module mod2

⌨️ 快捷键说明

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