aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_operator_19.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/typebound_operator_19.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/typebound_operator_19.f9029
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_operator_19.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_operator_19.f90
new file mode 100644
index 000000000..cf09379af
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_operator_19.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+!
+! PR fortran/54195
+! The compiler used to diagnose a duplicate entity in the assignment interface
+! because NC was resolved twice.
+!
+! Contributed by Damian Rouson <damian@rouson.net>
+
+module import_clashes_with_generic
+
+ type ,abstract :: foo
+ contains
+ procedure :: unary
+ generic :: operator(-) => unary
+ end type
+
+ abstract interface
+ integer function bar()
+ import :: foo
+ end function
+ end interface
+
+contains
+
+ integer function unary(rhs)
+ class(foo) ,intent(in) :: rhs
+ end function
+
+end module