summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/use_10.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/use_10.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/use_10.f9029
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/use_10.f90 b/gcc/testsuite/gfortran.dg/use_10.f90
new file mode 100644
index 000000000..e52fcff7e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/use_10.f90
@@ -0,0 +1,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