OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [use_7.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! Renaming of operators
! Renaming of operators
module z
module z
  type myT
  type myT
    integer :: t
    integer :: t
  end type myT
  end type myT
  interface operator(+)
  interface operator(+)
    module procedure sub2
    module procedure sub2
  end interface
  end interface
contains
contains
function sub2(x)
function sub2(x)
  type(myT) :: sub2
  type(myT) :: sub2
  type(myT),intent(in) :: x
  type(myT),intent(in) :: x
  sub2%t = x%t + 5
  sub2%t = x%t + 5
end function sub2
end function sub2
end module z
end module z
module y
module y
  interface operator(.addfive.)
  interface operator(.addfive.)
    module procedure sub
    module procedure sub
  end interface
  end interface
contains
contains
function sub(x)
function sub(x)
  integer :: sub
  integer :: sub
  integer,intent(in) :: x
  integer,intent(in) :: x
  sub = x + 15
  sub = x + 15
end function sub
end function sub
end module y
end module y
module x
module x
  interface operator(.addfive.)
  interface operator(.addfive.)
    module procedure sub
    module procedure sub
  end interface
  end interface
contains
contains
function sub(x)
function sub(x)
  integer :: sub
  integer :: sub
  integer,intent(in) :: x
  integer,intent(in) :: x
  sub = x + 25
  sub = x + 25
end function sub
end function sub
end module x
end module x
use z, operator(-) => operator(+) ! { dg-error "Syntax error in USE statement" }
use z, operator(-) => operator(+) ! { dg-error "Syntax error in USE statement" }
use z, operator(.op.) => operator(+) ! { dg-error "Syntax error in USE statement" }
use z, operator(.op.) => operator(+) ! { dg-error "Syntax error in USE statement" }
use x, only : bar => operator(.addfive.) ! { dg-error "Syntax error in USE statement" }
use x, only : bar => operator(.addfive.) ! { dg-error "Syntax error in USE statement" }
use y, operator(.my.) => sub ! { dg-error "Syntax error in USE statement" }
use y, operator(.my.) => sub ! { dg-error "Syntax error in USE statement" }
use y, operator(+) => operator(.addfive.) ! { dg-error "Syntax error in USE statement" }
use y, operator(+) => operator(.addfive.) ! { dg-error "Syntax error in USE statement" }
end
end
! { dg-final { cleanup-modules "x y z" } }
! { 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.