blob: 09b072610893fcf5bffeeb965dc074d05f4aa85c (
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
28
29
30
31
32
33
34
35
36
37
38
|
! { dg-do compile }
!
! PR 59143: [OOP] Bogus warning with array-valued type-bound procedure
!
! Contributed by Jürgen Reuter <juergen.reuter@desy.de>
module phs_single
type :: phs_single_t
contains
procedure, nopass :: d1, d2
end type
contains
subroutine evaluate (phs)
class(phs_single_t) :: phs
call func1 (phs%d1 ())
call func1 (phs%d2 (2))
end subroutine
subroutine func1 (p)
real :: p(2)
end subroutine
function d1 ()
real :: d1(2)
d1 = 1.
end function
function d2 (n)
real :: d2(n)
d2 = 1.
end function
end module
! { dg-final { cleanup-modules "phs_single" } }
|