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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c7/] [c72001b.ada] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
-- C72001B.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 A PACKAGE BODY CAN BE PROVIDED FOR A PACKAGE SPECIFICATION
26
--    THAT DOES NOT CONTAIN ANY SUBPROGRAM OR TASK DECLARATIONS AND THAT
27
--    STATEMENTS WITHIN THE PACKAGE BODIES CAN BE USED TO INITIALIZE
28
--    VARIABLES VISIBLE WITHIN THE PACKAGE BODY.
29
 
30
-- RM 04/30/81
31
-- RM 05/07/81 (TO INCORPORATE OLD TEST OBJECTIVE  7.1/T1 )
32
-- ABW 6/10/82
33
-- SPS 11/4/82
34
-- JBG 9/15/83
35
 
36
WITH REPORT;
37
PROCEDURE  C72001B  IS
38
 
39
     USE  REPORT;
40
 
41
BEGIN
42
 
43
     TEST( "C72001B" , "CHECK: PACKAGE BODIES CAN INITIALIZE VISIBLE" &
44
                       " VARIABLES" );
45
 
46
     DECLARE
47
 
48
 
49
          PACKAGE  P5  IS
50
 
51
               A : CHARACTER := 'B';
52
               B : BOOLEAN   := FALSE;
53
 
54
               PACKAGE  P6  IS
55
                    I : INTEGER := IDENT_INT(6);
56
               END  P6;
57
 
58
          END  P5;
59
 
60
 
61
          PACKAGE BODY  P5  IS
62
               PACKAGE BODY  P6  IS
63
               BEGIN
64
                    A := 'C';
65
                    I := 17;
66
                    B := IDENT_BOOL(TRUE);
67
               END  P6;
68
          BEGIN
69
               A := 'A';
70
          END  P5;
71
 
72
 
73
          USE  P5;
74
          USE  P6;
75
 
76
     BEGIN
77
 
78
          IF A /= 'A' THEN
79
               FAILED ("INITIALIZATIONS NOT CORRECT - 1");
80
          END IF;
81
 
82
          IF B /= TRUE THEN
83
               FAILED ("INITIALIZATIONS NOT CORRECT - 2");
84
          END IF;
85
 
86
          IF I /= 17 THEN
87
               FAILED ("INITIALIZATIONS NOT CORRECT - 3");
88
          END IF;
89
 
90
     END;
91
 
92
 
93
     RESULT;
94
 
95
 
96
END C72001B;

powered by: WebSVN 2.1.0

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