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.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [proc_decl_3.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 }
! Some tests for PROCEDURE declarations inside of interfaces.
! Some tests for PROCEDURE declarations inside of interfaces.
! Contributed by Janus Weil 
! Contributed by Janus Weil 
module m
module m
  interface
  interface
    subroutine a()
    subroutine a()
    end subroutine a
    end subroutine a
  end interface
  end interface
  procedure(c) :: f
  procedure(c) :: f
  interface bar
  interface bar
    procedure a,d
    procedure a,d
  end interface bar
  end interface bar
  interface foo
  interface foo
    procedure c
    procedure c
  end interface foo
  end interface foo
  abstract interface
  abstract interface
    procedure f  ! { dg-error "must be in a generic interface" }
    procedure f  ! { dg-error "must be in a generic interface" }
  end interface
  end interface
  interface
  interface
    function opfoo(a)
    function opfoo(a)
      integer,intent(in) :: a
      integer,intent(in) :: a
      integer :: opfoo
      integer :: opfoo
    end function opfoo
    end function opfoo
  end interface
  end interface
  interface operator(.op.)
  interface operator(.op.)
    procedure opfoo
    procedure opfoo
  end interface
  end interface
  external ex  ! { dg-error "has no explicit interface" }
  external ex  ! { dg-error "has no explicit interface" }
  procedure():: ip  ! { dg-error "has no explicit interface" }
  procedure():: ip  ! { dg-error "has no explicit interface" }
  procedure(real):: pip  ! { dg-error "has no explicit interface" }
  procedure(real):: pip  ! { dg-error "has no explicit interface" }
  interface nn1
  interface nn1
    procedure ex
    procedure ex
    procedure a, a  ! { dg-error "already present in the interface" }
    procedure a, a  ! { dg-error "already present in the interface" }
  end interface
  end interface
  interface nn2
  interface nn2
    procedure ip
    procedure ip
  end interface
  end interface
  interface nn3
  interface nn3
    procedure pip
    procedure pip
  end interface
  end interface
contains
contains
 subroutine d(x)
 subroutine d(x)
   interface
   interface
     subroutine x()
     subroutine x()
     end subroutine x
     end subroutine x
   end interface
   end interface
   interface gen
   interface gen
     procedure x
     procedure x
   end interface
   end interface
 end subroutine d
 end subroutine d
 function c(x)
 function c(x)
   integer :: x
   integer :: x
   real :: c
   real :: c
   c = 3.4*x
   c = 3.4*x
 end function c
 end function c
end module m
end module m
 
 

powered by: WebSVN 2.1.0

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