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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Renaming of operators
3
module z
4
  interface operator(.addfive.)
5
    module procedure sub2
6
  end interface
7
contains
8
function sub2(x)
9
  integer :: sub
10
  integer,intent(in) :: x
11
  sub2 = x + 5
12
end function sub2
13
end module z
14
 
15
module y
16
  interface operator(.addfive.)
17
    module procedure sub
18
  end interface
19
contains
20
function sub(x)
21
  integer :: sub
22
  integer,intent(in) :: x
23
  sub = x + 15
24
end function sub
25
end module y
26
 
27
module x
28
  interface operator(.addfive.)
29
    module procedure sub
30
  end interface
31
contains
32
function sub(x)
33
  integer :: sub
34
  integer,intent(in) :: x
35
  sub = x + 25
36
end function sub
37
end module x
38
 
39
use x, only : operator(.bar.) => operator(.addfive.)
40
use y, operator(.my.) => operator(.addfive.)
41
use z
42
 integer :: i
43
 i = 2
44
 if ((.bar. i) /= 2+25) call abort ()
45
 if ((.my. i) /= 2+15) call abort ()
46
 if ((.addfive. i) /= 2+5) call abort ()
47
end
48
 
49
! { dg-final { cleanup-modules "x y z" } }

powered by: WebSVN 2.1.0

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