+2012-11-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55297
+ * resolve.c (resolve_typebound_intrinsic_op): Only add typebound
+ operators to the operator list in the namespace of the derived type.
+
2012-11-12 Jan Hubicka <jh@suse.cz>
* f95-lang.c (ATTR_NOTHROW_LEAF_MALLOC_LIST): New macro.
/* Add target to non-typebound operator list. */
if (!target->specific->deferred && !derived->attr.use_assoc
- && p->access != ACCESS_PRIVATE)
+ && p->access != ACCESS_PRIVATE && derived->ns == gfc_current_ns)
{
gfc_interface *head, *intr;
if (gfc_check_new_interface (derived->ns->op[op], target_proc,
+2012-11-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55297
+ * gfortran.dg/typebound_operator_18.f90: New.
+
2012-11-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/55330
--- /dev/null
+! { dg-do compile }
+!
+! PR 55297: [4.8 Regression] [OOP] type-bound operator clashes with abstract interface
+!
+! Contributed by Damian Rouson <damian@rouson.net>
+
+module athlete_module
+ type athlete
+ contains
+ procedure :: negative
+ generic :: operator(-) => negative
+ end type
+ abstract interface
+ integer function sum_interface(this)
+ import athlete
+ class(athlete) this
+ end function
+ end interface
+contains
+ integer function negative(this)
+ class(athlete) ,intent(in) :: this
+ end function
+end module
+
+! { dg-final { cleanup-modules "athlete_module" } }