nested_modules_2.f90

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

F90
40
字号
! { dg-do run }! This tests the patch for PR16861.!! Contributed by Paul Thomas <pault@gcc.gnu.org>!module fooINTEGER :: iend module foomodule barcontainssubroutine sub1 (j)  use foo  integer, dimension(i) :: j  j = 42end subroutine sub1subroutine sub2 (k)  use foo  integer, dimension(i) :: k  k = 84end subroutine sub2end module barmodule foobar  use foo                      !This used to cause an ICE  use barend module foobarprogram testfoobar  use foobar  integer, dimension(3)  :: l = 0  i = 2  call sub1 (l)  i = 1  call sub2 (l)  if (all (l.ne.(/84,42,0/))) call abort ()end program testfoobar! { dg-final { cleanup-modules "foo bar foobar" } }

⌨️ 快捷键说明

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