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/] [typebound_proc_10.f03] - Rev 304
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do compile }
! Type-bound procedures
! Test for resolution errors with DEFERRED, namely checks about invalid
! overriding and taking into account inherited DEFERRED bindings.
! Also check that DEFERRED attribute is saved to module correctly.
MODULE m1
IMPLICIT NONE
ABSTRACT INTERFACE
SUBROUTINE intf ()
END SUBROUTINE intf
END INTERFACE
TYPE, ABSTRACT :: abstract_type
CONTAINS
PROCEDURE(intf), DEFERRED, NOPASS :: def
PROCEDURE, NOPASS :: nodef => realproc
END TYPE abstract_type
CONTAINS
SUBROUTINE realproc ()
END SUBROUTINE realproc
END MODULE m1
MODULE m2
USE m1
IMPLICIT NONE
TYPE, ABSTRACT, EXTENDS(abstract_type) :: sub_type1
CONTAINS
PROCEDURE(intf), DEFERRED, NOPASS :: nodef ! { dg-error "must not be DEFERRED" }
END TYPE sub_type1
TYPE, EXTENDS(abstract_type) :: sub_type2 ! { dg-error "must be ABSTRACT" }
END TYPE sub_type2
END MODULE m2
! { dg-final { cleanup-modules "m1" } }
Go to most recent revision | Compare with Previous | Blame | View Log