re PR fortran/60853 ([OOP] Failure to disambiguate generic with unlimited polymorphic)
[gcc.git] / gcc / testsuite / gfortran.dg / typebound_assignment_8.f90
1 ! { dg-do compile }
2 !
3 ! PR 60853: [OOP] Failure to disambiguate generic with unlimited polymorphic
4 !
5 ! Contributed by tlcclt <Thomas.L.Clune@nasa.gov>
6
7 module foo_mod
8 implicit none
9
10 type Vector
11 contains
12 procedure :: copyFromScalar
13 procedure :: copyFromArray
14 generic :: assignment(=) => copyFromScalar, copyFromArray
15 end type
16
17 contains
18
19 subroutine copyFromScalar(this, scalar)
20 class (Vector), intent(inout) :: this
21 type (Vector), intent(in) :: scalar
22 end subroutine
23
24 subroutine copyFromArray(this, array)
25 class (Vector), intent(inout) :: this
26 class (*), intent(in) :: array(:)
27 end subroutine
28
29 end module