fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_decl_10.f90
blob88fd6d8a793a15e809eea5619494e14986951ad3
1 ! { dg-do compile }
2 ! PR33162 INTRINSIC functions as ACTUAL argument
3 ! Test case adapted from PR by Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 module m
5 implicit none
6 interface
7 double precision function my1(x)
8 double precision, intent(in) :: x
9 end function my1
10 end interface
11 interface
12 real(kind=4) function my2(x)
13 real, intent(in) :: x
14 end function my2
15 end interface
16 interface
17 real function my3(x, y)
18 real, intent(in) :: x, y
19 end function my3
20 end interface
21 end module
23 program test
24 use m
25 implicit none
26 procedure(dcos):: my1 ! { dg-error "Cannot change attributes" }
27 procedure(cos) :: my2 ! { dg-error "Cannot change attributes" }
28 procedure(dprod) :: my3 ! { dg-error "Cannot change attributes" }
30 end program test
32 ! { dg-final { cleanup-modules "m" } }