OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [typebound_proc_2.f90] - Rev 694

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.