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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [module_interface_2.f90] - Diff between revs 303 and 338

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

Rev 303 Rev 338
! Test generic interfaces declared in modules.
! Test generic interfaces declared in modules.
! We used to get the name mangling wrong for these.
! We used to get the name mangling wrong for these.
module module_interface_2
module module_interface_2
  interface foo
  interface foo
    subroutine myfoo (i)
    subroutine myfoo (i)
      integer i
      integer i
    end subroutine
    end subroutine
    module procedure bar
    module procedure bar
  end interface
  end interface
contains
contains
subroutine bar (r)
subroutine bar (r)
  real r
  real r
  if (r .ne. 1.0) call abort ()
  if (r .ne. 1.0) call abort ()
end subroutine
end subroutine
end module
end module
subroutine myfoo (i)
subroutine myfoo (i)
  integer i
  integer i
  if (i .ne. 42) call abort ()
  if (i .ne. 42) call abort ()
end subroutine
end subroutine
program test
program test
  use module_interface_2
  use module_interface_2
  call foo (42)
  call foo (42)
  call foo (1.0)
  call foo (1.0)
end program
end program
 
 

powered by: WebSVN 2.1.0

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