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.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [typebound_proc_8.f03] - Rev 302
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do compile }
! Type-bound procedures
! Test for name collision between type-bound procedures and components.
MODULE testmod
IMPLICIT NONE
TYPE t
REAL :: comp
CONTAINS
PROCEDURE, NOPASS :: comp => proc ! { dg-error "same name as a component" }
END TYPE t
TYPE supert
INTEGER :: comp1
CONTAINS
PROCEDURE, NOPASS :: comp2 => proc
END TYPE supert
TYPE, EXTENDS(supert) :: subt1
INTEGER :: comp2 ! { dg-error "same name" }
END TYPE subt1
TYPE, EXTENDS(supert) :: subt2
CONTAINS
PROCEDURE, NOPASS :: comp1 => proc ! { dg-error "same name as an inherited component" }
END TYPE subt2
CONTAINS
SUBROUTINE proc ()
END SUBROUTINE proc
END MODULE testmod
! { dg-final { cleanup-modules "testmod" } }
Go to most recent revision | Compare with Previous | Blame | View Log