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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

! { dg-do compile }
! Check for re-definition of inherited components in the sub-type.

MODULE m1
  IMPLICIT NONE

  TYPE supert
    INTEGER :: c1
    INTEGER, PRIVATE :: c2
  END TYPE supert

END MODULE m1

MODULE m2
  USE m1 ! { dg-error "already in the parent type" }
  IMPLICIT NONE

  TYPE, EXTENDS(supert) :: subt
    INTEGER :: c1 ! { dg-error "already in the parent type" }
    INTEGER :: c2 ! { dg-error "already in the parent type" }
  END TYPE subt

END MODULE m2

! { dg-final { cleanup-modules "m1 m2" } }

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.