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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [private_type_2.f90] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
! { dg-options "-std=f95" }
3
! PR16404 test 6 - If a component of a derived type is of a type declared to
4
! be private, either the derived type definition must contain the PRIVATE
5
! statement, or the derived type must be private.
6
! Modified on 20051105 to test PR24534.
7
! Modified on 20090419 to use -std=f95, since F2003 allows public types
8
! with private components.
9
!
10
! Contributed by Joost VandeVondele 
11
MODULE TEST
12
  PRIVATE
13
  TYPE :: info_type
14
   INTEGER :: value
15
  END TYPE info_type
16
  TYPE :: all_type! { dg-error "PRIVATE type and cannot be a component" }
17
    TYPE(info_type) :: info
18
  END TYPE
19
  TYPE :: any_type! This is OK because of the PRIVATE statement.
20
    PRIVATE
21
    TYPE(info_type) :: info
22
  END TYPE
23
  public  all_type, any_type
24
END MODULE
25
END
26
 
27
! { 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.