aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_generic_14.f03
blob: 8515cf4378f483e33a6b54be6af9038ec8d98543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! { dg-do compile }
!
! PR 54594: [OOP] Type-bound ASSIGNMENTs (elemental + array version) rejected as ambiguous
!
! Contributed by James van Buskirk

module a_mod

  type :: a
   contains
     procedure, NOPASS :: a_ass, a_ass_sv
     generic :: ass => a_ass, a_ass_sv
  end type

contains

  impure elemental subroutine a_ass (out)
    class(a), intent(out) :: out
  end subroutine

  subroutine a_ass_sv (out)
    class(a), intent(out) :: out(:)
  end subroutine

end module

! { dg-final { cleanup-modules "a_mod" } }