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/] [abstract_type_4.f03] - Rev 384

Compare with Previous | Blame | View Log

! { dg-do "compile" }

! Abstract Types.
! Check for module file IO.

MODULE m
  IMPLICIT NONE

  TYPE, ABSTRACT :: abst_t
    INTEGER :: x
  END TYPE abst_t

  TYPE, EXTENDS(abst_t) :: concrete_t
    INTEGER :: y
  END TYPE concrete_t

END MODULE m

PROGRAM main
  USE m
  IMPLICIT NONE

  TYPE(abst_t) :: abst ! { dg-error "is of the ABSTRACT type 'abst_t'" }
  TYPE(concrete_t) :: conc

  ! See if constructing the extending type works.
  conc = concrete_t (1, 2)
END PROGRAM main
! { dg-final { cleanup-modules "m" } }

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.