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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [a/] [a74205f.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- A74205F.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
9
--     this public release, the Government intends to confer upon all 
10
--     recipients unlimited rights  equal to those held by the Government.  
11
--     These rights include rights to use, duplicate, release or disclose the 
12
--     released technical data and computer software in whole or in part, in 
13
--     any manner and for any purpose whatsoever, and to have or permit others 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- CHECK THAT FOR AN ACCESS TYPE WHOSE DESIGNATED TYPE IS A PRIVATE TYPE
26
-- ADDITIONAL OPERATIONS FOR THE ACCESS TYPE WHICH DEPEND ON
27
-- CHARACTERISTICS OF THE FULL DECLARATION OF THE PRIVATE TYPE ARE MADE
28
-- AVAILABLE AT THE EARLIEST PLACE WITHIN THE IMMEDIATE SCOPE OF THE
29
-- ACCESS TYPE DECLARATION AND AFTER THE FULL DECLARATION OF THE PRIVATE
30
-- TYPE.
31
 
32
-- (1) CHECK FOR COMPONENT SELECTION WITH RECORD TYPES
33
-- (2) CHECK FOR INDEXED COMPONENTS AND SLICES WITH ARRAY TYPES
34
-- (3) CHECK FOR USE OF 'FIRST, 'LAST, 'RANGE, AND 'LENGTH WITH ARRAY
35
--     TYPES
36
 
37
-- DSJ 5/5/83
38
 
39
WITH REPORT ;
40
PROCEDURE A74205F IS
41
 
42
     USE REPORT ;
43
 
44
BEGIN
45
 
46
     TEST("A74205F", "CHECK THAT ADDITIONAL OPERATIONS OF ACCESS TYPES "
47
                   & "OF PRIVATE TYPES ARE AVAILABLE AT THE EARLIEST "
48
                   & "PLACE IN THE IMMEDIATE SCOPE OF THE ACCESS TYPE "
49
                   & "AND AFTER THE FULL DECLARATION") ;
50
 
51
     DECLARE
52
 
53
          PACKAGE PACK1 IS
54
               TYPE T1 IS PRIVATE ;
55
               TYPE T2 IS PRIVATE ;
56
               PACKAGE PACK2 IS
57
                    TYPE ACC1 IS ACCESS T1 ;
58
                    TYPE ACC2 IS ACCESS T2 ;
59
               END PACK2 ;
60
          PRIVATE
61
               TYPE T1 IS ARRAY ( 1 .. 2 ) OF INTEGER ;
62
               TYPE T2 IS
63
                    RECORD
64
                         C1, C2 : INTEGER ;
65
                    END RECORD ;
66
          END PACK1 ;
67
 
68
          PACKAGE BODY PACK1 IS
69
               A1 : PACK2.ACC1 := NEW T1'(2,4) ;  -- LEGAL
70
               A2 : PACK2.ACC1 := NEW T1'(6,8) ;  -- LEGAL
71
               R1 : PACK2.ACC2 := NEW T2'(3,5) ;  -- LEGAL
72
               R2 : PACK2.ACC2 := NEW T2'(7,9) ;  -- LEGAL
73
 
74
               PACKAGE BODY PACK2 IS
75
                    X1 : INTEGER := A1(1) ;            -- LEGAL
76
                    X2 : INTEGER := A1'FIRST ;         -- LEGAL
77
                    X3 : INTEGER := A1'LAST ;          -- LEGAL
78
                    X4 : INTEGER := A1'LENGTH ;        -- LEGAL
79
                    B1 : BOOLEAN := 3 IN A1'RANGE ;    -- LEGAL
80
                    X5 : INTEGER := R1.C1 ;            -- LEGAL
81
               END PACK2 ;
82
 
83
          END PACK1 ;
84
 
85
     BEGIN
86
 
87
          NULL ;
88
 
89
     END ;
90
 
91
     RESULT ;
92
 
93
END A74205F ;

powered by: WebSVN 2.1.0

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