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/] [c8/] [c83f01d0.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C83F01D0M.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
-- MAIN PROGRAM REQUIRING A SEPARATELY COMPILED PACKAGE BODY SUBUNIT
26
--    ( C83F01D1.ADA )
27
 
28
-- CHECK THAT INSIDE A PACKAGE BODY NESTED WITHIN A SEPARATELY COMPILED
29
--    PACKAGE BODY AN ATTEMPT TO REFERENCE AN IDENTIFIER DECLARED IN THE
30
--    CORRESPONDING PACKAGE SPECIFICATION
31
--    IS SUCCESSFUL EVEN IF THE SAME IDENTIFIER IS DECLARED IN THE
32
--    OUTER PACKAGE (SPECIFICATION OR BODY).
33
 
34
-- CASE 2:  PACKAGE BODY IS A COMPILATION SUBUNIT
35
 
36
 
37
--    RM    13 AUGUST 1980
38
--    RM    29 AUGUST 1980
39
--    JRK   13 NOV    1980
40
 
41
 
42
WITH REPORT;
43
PROCEDURE  C83F01D0M  IS
44
 
45
     USE REPORT ;
46
 
47
     X1 , X2 : INTEGER RANGE 1..23 := 17 ;
48
     Y1      : INTEGER := 157 ;
49
 
50
     TYPE  T1  IS  ( A , B , C) ;
51
 
52
     Z : T1 := A ;
53
 
54
 
55
     PACKAGE  C83F01D1  IS
56
 
57
          Y3 : INTEGER := 100 ;
58
 
59
          PACKAGE  P  IS
60
 
61
               X1 : BOOLEAN := FALSE ;
62
               X2 : INTEGER RANGE 1..23 := 11 ;
63
               Y1 , Y3 : BOOLEAN := TRUE ;
64
               Y2 , Y4 : INTEGER := 5 ;
65
               T1 : INTEGER := 23 ;
66
               Z  : INTEGER := 0 ;
67
 
68
          END  P ;
69
 
70
     END  C83F01D1 ;
71
 
72
 
73
     Y2 : INTEGER := 200 ;
74
 
75
 
76
     PACKAGE BODY  C83F01D1  IS SEPARATE ;
77
 
78
 
79
BEGIN
80
 
81
     TEST( "C83F01D" , "CHECK THAT INSIDE A  PACKAGE BODY" &
82
                       " NESTED WITHIN A SEPARATELY" &
83
                       " COMPILED PACKAGE BODY SUBUNIT," &
84
                       " AN ATTEMPT TO REFERENCE AN IDENTIFIER" &
85
                       " DECLARED IN THE CORRESPONDING PACKAGE SPECI" &
86
                       "FICATION  IS SUCCESSFUL EVEN IF THE SAME IDEN" &
87
                       "TIFIER IS DECLARED IN THE OUTER PACKAGE" &
88
                       " (SPECIFICATION OR BODY)" ) ;
89
 
90
     IF  X1 /= 17   OR
91
         Z  /= A    OR
92
         Y2 /= 200  OR
93
         NOT C83F01D1.P.X1    OR
94
         C83F01D1.P.Z  /= 23  OR
95
         C83F01D1.P.Y2 /= 55  OR
96
         C83F01D1.P.Y4 /= 55
97
     THEN FAILED( "INCORRECT ACCESSING" );
98
     END IF;
99
 
100
     RESULT ;
101
 
102
 
103
END C83F01D0M;

powered by: WebSVN 2.1.0

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