This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi all, here is a patch that fixes a rejects-valid problem with an unlimited-polymorphic variable in a generic procedure. Removing the line with UNLIMITED_POLY fixes the error and the rest of the patch is just slightly refactoring the for-loop. Regtested successfully on x86_64-linux-gnu. Ok for trunk? Cheers, Janus 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 Janus Weil <janus@gcc.gnu.org> PR fortran/60853 * gfortran.dg/typebound_assignment_8.f90: New test case.
Attachment:
pr60853_v2.diff
Description: Text document
! { 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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |