blob: 7ddaf1b159653874844ba01d824ebab2948bd124 (
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
|
! { dg-do run }
!
! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
!
! Contributed by Janus Weil <janus@gcc.gnu.org>
module m
implicit none
interface testIF
module procedure test1
module procedure test2
end interface
contains
real function test1 (obj)
real :: obj
test1 = obj
end function
real function test2 (pr)
procedure(real) :: pr
test2 = pr(0.)
end function
end module
program test
use m
implicit none
intrinsic :: cos
if (testIF(2.0)/=2.0) STOP 1
if (testIF(cos)/=1.0) STOP 2
end program
|