+2016-11-25 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/60853
+ * interface.c (gfc_compare_interfaces): Remove bad special case for
+ unlimited polymorphism. Refactor for loop.
+
2016-11-25 Andre Vehreschild <vehre@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
This is also done when comparing interfaces for dummy procedures and in
procedure pointer assignments. */
- for (;;)
+ for (; f1 || f2; f1 = f1->next, f2 = f2->next)
{
/* Check existence. */
- if (f1 == NULL && f2 == NULL)
- break;
if (f1 == NULL || f2 == NULL)
{
if (errmsg != NULL)
return 0;
}
- if (UNLIMITED_POLY (f1->sym))
- goto next;
-
if (strict_flag)
{
/* Check all characteristics. */
return 0;
}
}
-next:
- f1 = f1->next;
- f2 = f2->next;
}
return 1;
+2016-11-25 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/60853
+ * gfortran.dg/typebound_assignment_8.f90: New test case.
+
2016-11-25 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/78527
--- /dev/null
+! { dg-do compile }
+!
+! PR 60853: [OOP] Failure to disambiguate generic with unlimited polymorphic
+!
+! Contributed by tlcclt <Thomas.L.Clune@nasa.gov>
+
+module foo_mod
+ implicit none
+
+ type Vector
+ contains
+ procedure :: copyFromScalar
+ procedure :: copyFromArray
+ generic :: assignment(=) => copyFromScalar, copyFromArray
+ end type
+
+contains
+
+ subroutine copyFromScalar(this, scalar)
+ class (Vector), intent(inout) :: this
+ type (Vector), intent(in) :: scalar
+ end subroutine
+
+ subroutine copyFromArray(this, array)
+ class (Vector), intent(inout) :: this
+ class (*), intent(in) :: array(:)
+ end subroutine
+
+end module