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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gfortran.dg/] [private_type_2.f90] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
! { dg-do compile }
2
! PR16404 test 6 - If a component of a derived type is of a type declared to
3
! be private, either the derived type definition must contain the PRIVATE
4
! statement, or the derived type must be private.
5
! Modified on 20051105 to test PR24534.
6
!
7
! Contributed by Joost VandeVondele 
8
MODULE TEST
9
  PRIVATE
10
  TYPE :: info_type
11
   INTEGER :: value
12
  END TYPE info_type
13
  TYPE :: all_type! { dg-error "PRIVATE type and cannot be a component" }
14
    TYPE(info_type) :: info
15
  END TYPE
16
  TYPE :: any_type! This is OK because of the PRIVATE statement.
17
    PRIVATE
18
    TYPE(info_type) :: info
19
  END TYPE
20
  public  all_type, any_type
21
END MODULE
22
END
23
 
24
! { dg-final { cleanup-modules "TEST" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.