OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [intrinsic_3.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-std=f95" }
3
!
4
! PR 39876: module procedure name that collides with the GNU intrinsic
5
!
6
! Contributed by Alexei Matveev 
7
 
8
module p
9
  implicit none
10
 
11
  contains
12
 
13
    subroutine test()
14
      implicit none
15
      print *, avg(erfc)
16
    end subroutine test
17
 
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
29
 
30
    function erfc(x)
31
      implicit none
32
      double precision, intent(in) :: x
33
      double precision             :: erfc
34
      erfc = x
35
    end function erfc
36
 
37
end module p
38
 
39
! { dg-final { cleanup-modules "p" } }
40
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.