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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Renaming of operators
3
module z
4
  type myT
5
    integer :: t
6
  end type myT
7
  interface operator(+)
8
    module procedure sub2
9
  end interface
10
contains
11
function sub2(x)
12
  type(myT) :: sub2
13
  type(myT),intent(in) :: x
14
  sub2%t = x%t + 5
15
end function sub2
16
end module z
17
 
18
module y
19
  interface operator(.addfive.)
20
    module procedure sub
21
  end interface
22
contains
23
function sub(x)
24
  integer :: sub
25
  integer,intent(in) :: x
26
  sub = x + 15
27
end function sub
28
end module y
29
 
30
module x
31
  interface operator(.addfive.)
32
    module procedure sub
33
  end interface
34
contains
35
function sub(x)
36
  integer :: sub
37
  integer,intent(in) :: x
38
  sub = x + 25
39
end function sub
40
end module x
41
 
42
use z, operator(-) => operator(+) ! { dg-error "Syntax error in USE statement" }
43
use z, operator(.op.) => operator(+) ! { dg-error "Syntax error in USE statement" }
44
use x, only : bar => operator(.addfive.) ! { dg-error "Syntax error in USE statement" }
45
use y, operator(.my.) => sub ! { dg-error "Syntax error in USE statement" }
46
use y, operator(+) => operator(.addfive.) ! { dg-error "Syntax error in USE statement" }
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.