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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [private_type_2.f90] - Rev 823

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do compile }
! PR16404 test 6 - If a component of a derived type is of a type declared to
! be private, either the derived type definition must contain the PRIVATE
! statement, or the derived type must be private.
! Modified on 20051105 to test PR24534.
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
MODULE TEST
  PRIVATE
  TYPE :: info_type
   INTEGER :: value
  END TYPE info_type
  TYPE :: all_type! { dg-error "PRIVATE type and cannot be a component" }
    TYPE(info_type) :: info
  END TYPE
  TYPE :: any_type! This is OK because of the PRIVATE statement.
    PRIVATE
    TYPE(info_type) :: info
  END TYPE
  public  all_type, any_type
END MODULE
END

! { dg-final { cleanup-modules "TEST" } }

Go to most recent revision | 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.