URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [generic_14.f90] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do compile }!! Check whether MODULE PROCEDUREs are properly treated! They need to be contained in a procedure, i.e. an! interface in another procedure is invalid; they may, however,! come from a use-associated procedure.! (The PROCEDURE statement allows also for non-module procedures! if there is an explicit interface.)!! PR fortran/33228!module inclmodimplicit noneinterfacesubroutine wrong1(a)integer :: aend subroutine wrong1end interfaceinterface gen_inclmodule procedure ok1end interface gen_inclexternal wrong2external wrong3real wrong3containssubroutine ok1(f)character :: fend subroutine ok1end module inclmodmodule ause inclmodimplicit noneinterface gensubroutine ok1_a(a,b)integer :: a,bend subroutine ok1_amodule procedure ok1, ok2_aend interface gencontainssubroutine ok2_a(a,b,c)integer :: a,b,cend subroutine ok2_aend module amodule buse inclmodinterface gen_wrong_0module procedure gen_incl ! { dg-error "Cannot change attributes" }end interface gen_wrong_0end module bmodule cuse inclmodinterface gen_wrong_1module procedure wrong1 ! { dg-error "is not a module procedure" }end interface gen_wrong_1end module cmodule duse inclmodinterface gen_wrong_2module procedure wrong2 ! { dg-error "Cannot change attributes" }end interface gen_wrong_2end module dmodule euse inclmodinterface gen_wrong_3module procedure wrong3 ! { dg-error "Cannot change attributes" }end interface gen_wrong_3end module emodule fimplicit noneinterfacesubroutine wrong_a(a)integer :: aend subroutine wrong_aend interfaceinterface gen_wrong_4module procedure wrong_a ! { dg-error "is not a module procedure" }end interface gen_wrong_4end module fmodule gimplicit noneexternal wrong_binterface gen_wrong_5module procedure wrong_b ! { dg-error "has no explicit interface" }end interface gen_wrong_5end module gmodule himplicit noneexternal wrong_creal wrong_cinterface gen_wrong_6module procedure wrong_c ! { dg-error "has no explicit interface" }end interface gen_wrong_6end module hend! { dg-final { cleanup-modules "a inclmod" } }
