OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [typebound_proc_2.f90] - Rev 384

Compare with Previous | Blame | View Log

! { dg-do compile }
! { dg-options "-std=f95" }

! Type-bound procedures
! Test that F95 does not allow type-bound procedures

MODULE testmod
  IMPLICIT NONE

  TYPE t
    INTEGER :: x
  CONTAINS ! { dg-error "Fortran 2003" }
    PROCEDURE proc1 ! { dg-error "Fortran 2003" }
    PROCEDURE :: proc2 => p2 ! { dg-error "Fortran 2003" }
  END TYPE t

CONTAINS
  
  SUBROUTINE proc1 (me)
    IMPLICIT NONE
    TYPE(t1) :: me
  END SUBROUTINE proc1

  REAL FUNCTION proc2 (me, x)
    IMPLICIT NONE
    TYPE(t1) :: me
    REAL :: x
    proc2 = x / 2
  END FUNCTION proc2

END MODULE testmod

! { dg-final { cleanup-modules "testmod" } }
! { dg-excess-errors "no IMPLICIT type" }

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.