re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_27.f90
blob7ddaf1b159653874844ba01d824ebab2948bd124
1 ! { dg-do run }
3 ! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 module m
8 implicit none
9 interface testIF
10 module procedure test1
11 module procedure test2
12 end interface
13 contains
14 real function test1 (obj)
15 real :: obj
16 test1 = obj
17 end function
18 real function test2 (pr)
19 procedure(real) :: pr
20 test2 = pr(0.)
21 end function
22 end module
24 program test
25 use m
26 implicit none
27 intrinsic :: cos
29 if (testIF(2.0)/=2.0) STOP 1
30 if (testIF(cos)/=1.0) STOP 2
32 end program