Merge aosp-toolchain/gcc/gcc-4_9 changes.
[official-gcc.git] / gcc-4_9 / gcc / testsuite / gfortran.dg / intrinsic_3.f90
blob3d639e3744ea508fac989eac2c1a6763120738fe
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
4 ! PR 39876: module procedure name that collides with the GNU intrinsic
6 ! Contributed by Alexei Matveev <alexei.matveev+gcc@gmail.com>
8 module p
9 implicit none
11 contains
13 subroutine test()
14 implicit none
15 print *, avg(erfc)
16 end subroutine test
18 function avg(f)
19 implicit none
20 double precision :: avg
21 interface
22 double precision function f(x)
23 implicit none
24 double precision, intent(in) :: x
25 end function f
26 end interface
27 avg = ( f(1.0D0) + f(2.0D0) ) / 2
28 end function avg
30 function erfc(x)
31 implicit none
32 double precision, intent(in) :: x
33 double precision :: erfc
34 erfc = x
35 end function erfc
37 end module p