summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/use_10.f90
blob: e52fcff7e5956e02390ee0fd343296cd2485e456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
! { dg-do run }
module a
 implicit none
interface operator(.op.)
  module procedure sub
end interface
interface operator(.ops.)
  module procedure sub2
end interface

contains
  function sub(i)
    integer :: sub
    integer,intent(in) :: i
    sub = -i
  end function sub
  function sub2(i)
    integer :: sub2
    integer,intent(in) :: i
    sub2 = i
  end function sub2
end module a

program test
use a, only: operator(.op.), operator(.op.), &
operator(.my.)=>operator(.op.),operator(.ops.)=>operator(.op.)
implicit none
if (.my.2 /= -2 .or. .op.3 /= -3 .or. .ops.7 /= -7) call abort()
end