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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [interface_8.f90] - Rev 823

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

! { dg-do compile }
! One of the tests of the patch for PR30068.
! Taken from the fortran standard.
!
! Although the generic procedure is not referenced and it would
! normally be permissible for it to be ambiguous, the USE, ONLY
! statement is effectively a reference and is invalid.
!
module mod1
   interface generic
      subroutine foo(a)
         real :: a
      end subroutine
   end interface generic
end module  mod1

module mod2
   interface generic
      subroutine bar(a)
         real :: a
      end subroutine
   end interface generic
end module  mod2

program main
  use mod1, only: generic   ! { dg-warning "has ambiguous interfaces" }
  use mod2
end program main

! { dg-final { cleanup-modules "mod1 mod2" } }

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

powered by: WebSVN 2.1.0

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