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_1.f90] - Rev 853

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

! { dg-do compile }
! This program would segfault without the patch for PR fortran/24005.
module y
  !
  ! If private statement is removed, then we get a bunch of errors
  !
  private f
  !
  ! If we rename 'f' in module y to say 'g', then gfortran correctly
  ! identifies ambiguous as being ambiguous.
  !
  interface ambiguous
    module procedure f
  end interface

  contains

    real function f(a)
      real a
      f = a
    end function

end module y

module z

  use y

  interface ambiguous
    module procedure f    ! { dg-warning "in generic interface" "" }
  end interface

  contains

    real function f(a)
      real a
      f = a
    end function

end module z

! { dg-final { cleanup-modules "y z" } }

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.