use_4.f90

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

F90
35
字号
! { dg-do compile }! PR fortran/30973! Using symbols with the name of the modulemodule foo  integer :: iend module foomodule bar  integer :: jend module barmodule test  use foo, only:  integer :: foo ! { dg-error "cannot have a type" }end module testmodule test2  use bar, only: foo => j  use foo ! ok, unless foo is accessedend module test2module test3  use bar, only: foo => j  use foo ! ok, unless foo is accessed  foo = 5 ! { dg-error "is an ambiguous reference to 'j'" }end module test3program test_foo  use foo, only: foo  ! { dg-error "been used as an external module name" }  use foo, only: i => foo! { dg-error "been used as an external module name" }  use foo, only: foo => i! { dg-error "been used as an external module name" }end program! { dg-final { cleanup-modules "foo bar test test2 test3" } }

⌨️ 快捷键说明

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