use_5.f90
来自「用于进行gcc测试」· F90 代码 · 共 50 行
F90
50 行
! { dg-do run }! Renaming of operatorsmodule z interface operator(.addfive.) module procedure sub2 end interfacecontainsfunction sub2(x) integer :: sub integer,intent(in) :: x sub2 = x + 5end function sub2end module zmodule y interface operator(.addfive.) module procedure sub end interfacecontainsfunction sub(x) integer :: sub integer,intent(in) :: x sub = x + 15end function subend module ymodule x interface operator(.addfive.) module procedure sub end interfacecontainsfunction sub(x) integer :: sub integer,intent(in) :: x sub = x + 25end function subend module xuse x, only : operator(.bar.) => operator(.addfive.)use y, operator(.my.) => operator(.addfive.)use z integer :: i i = 2 if ((.bar. i) /= 2+25) call abort () if ((.my. i) /= 2+15) call abort () if ((.addfive. i) /= 2+5) call abort ()end! { dg-final { cleanup-modules "x y z" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?