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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C73002A.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 THE STATEMENTS IN A PACKAGE BODY ARE EXECUTED AFTER THE
26
--    ELABORATION OF THE DECLARATIONS (IN SPEC AND IN BODY).
27
 
28
 
29
-- RM 05/15/81
30
-- JBG 9/21/83
31
 
32
WITH REPORT;
33
PROCEDURE  C73002A  IS
34
 
35
     USE  REPORT;
36
 
37
BEGIN
38
 
39
     TEST( "C73002A" , "CHECK: EXECUTION OF STATEMENTS IN A PACKAGE " &
40
                       "BODY FOLLOWS ELABORATION OF THE DECLARATIONS");
41
 
42
     DECLARE
43
 
44
          PACKAGE  P1  IS
45
 
46
               A : INTEGER := IDENT_INT(7);
47
 
48
               PACKAGE  P2  IS
49
                    B : INTEGER := IDENT_INT(11);
50
               END  P2;
51
 
52
          END  P1;
53
 
54
 
55
          PACKAGE BODY  P1  IS               --   A  AA   B  BB
56
 
57
               AA : INTEGER := IDENT_INT(7); --   7   7  11 (11)
58
 
59
               PACKAGE BODY  P2  IS
60
                    BB : INTEGER := IDENT_INT(11);--  7  11  11
61
               BEGIN
62
 
63
                    B  := 2*B ;             --   7   7  22  11
64
                    BB := 2*BB;             --   7   7  22  22
65
                    A  := 5*A ;             --  35   7  22  22
66
                    AA := 2*AA;             --  35  14  22  22
67
 
68
                    IF  BB /=  22  OR
69
                        AA /=  14  OR
70
                        A  /=  35  OR
71
                        B  /=  22
72
                    THEN
73
                         FAILED( "ASSIGNED VALUES INCORRECT  -  1" );
74
                    END IF;
75
 
76
               END  P2;
77
 
78
          BEGIN
79
 
80
               A  :=  A  + 20;              --  55  14  22  22
81
               AA :=  AA + 20;              --  55  34  22  22
82
 
83
               IF  AA /=  34  OR
84
                   A  /=  55  OR
85
                   P2.B /=  22
86
               THEN
87
                    FAILED( "ASSIGNED VALUES INCORRECT  -  2" );
88
               END IF;
89
 
90
          END  P1;
91
 
92
 
93
          USE  P1;
94
          USE  P2;
95
 
96
     BEGIN
97
 
98
          IF  A  /=  55  OR
99
              B  /=  22
100
          THEN
101
               FAILED( "ASSIGNED VALUES INCORRECT  -  3" );
102
          END IF;
103
 
104
     END;
105
 
106
 
107
     RESULT;
108
 
109
 
110
END C73002A;

powered by: WebSVN 2.1.0

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