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/] [c74208b.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C74208B.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
-- OBJECTIVE:
26
--     CHECK THAT 'CONSTRAINED FOR OBJECTS OF A PRIVATE TYPE WITH
27
--     VISIBLE DISCRIMINANTS IS AVAILABLE OUTSIDE THE PACKAGE DECLARING
28
--     THE TYPE AND IS AVAILABLE BEFORE AND AFTER THE FULL DECLARATION.
29
 
30
-- HISTORY:
31
--     BCB 07/14/88  CREATED ORIGINAL TEST.
32
--     GJD 11/15/95  MOVED REC2_VAR OUT OF P DUE TO ADA 95 FREEZING RULES.
33
 
34
WITH REPORT; USE REPORT;
35
 
36
PROCEDURE C74208B IS
37
 
38
     PACKAGE P IS
39
          TYPE REC (D : INTEGER := 0) IS PRIVATE;
40
          R1 : CONSTANT REC;
41
          TYPE REC2 IS RECORD
42
               COMP : BOOLEAN := R1'CONSTRAINED;
43
          END RECORD;
44
     PRIVATE
45
          TYPE REC (D : INTEGER := 0) IS RECORD
46
               NULL;
47
          END RECORD;
48
          R1 : CONSTANT REC := (D => 5);
49
          R2 : REC := (D => 0);
50
          R2A : REC(3);
51
          R2CON : CONSTANT REC := (D => 3);
52
          C : BOOLEAN := R2'CONSTRAINED;
53
          D : BOOLEAN := R2A'CONSTRAINED;
54
          E : BOOLEAN := R2CON'CONSTRAINED;
55
     END P;
56
 
57
     REC2_VAR : P.REC2;
58
 
59
     R3 : P.REC(0);
60
     R3A : P.REC;
61
 
62
     A : BOOLEAN := R3'CONSTRAINED;
63
     B : BOOLEAN := R3A'CONSTRAINED;
64
 
65
     PACKAGE BODY P IS
66
     BEGIN
67
          TEST ("C74208B", "CHECK THAT 'CONSTRAINED FOR OBJECTS OF A " &
68
                           "PRIVATE TYPE WITH VISIBLE DISCRIMINANTS " &
69
                           "IS AVAILABLE OUTSIDE THE PACKAGE " &
70
                           "DECLARING THE TYPE AND IS AVAILABLE " &
71
                           "BEFORE AND AFTER THE FULL DECLARATION");
72
 
73
          IF NOT REC2_VAR.COMP THEN
74
               FAILED ("IMPROPER VALUE FOR 'CONSTRAINED BEFORE THE " &
75
                       "FULL DECLARATION OF THE PRIVATE TYPE");
76
          END IF;
77
 
78
          IF C THEN
79
               FAILED ("IMPROPER VALUE FOR 'CONSTRAINED AFTER THE " &
80
                       "FULL DECLARATION OF THE PRIVATE TYPE - 1");
81
          END IF;
82
 
83
          IF NOT D THEN
84
               FAILED ("IMPROPER VALUE FOR 'CONSTRAINED AFTER THE " &
85
                       "FULL DECLARATION OF THE PRIVATE TYPE - 2");
86
          END IF;
87
 
88
          IF NOT E THEN
89
               FAILED ("IMPROPER VALUE FOR 'CONSTRAINED AFTER THE " &
90
                       "FULL DECLARATION OF THE PRIVATE TYPE - 3");
91
          END IF;
92
     END P;
93
 
94
BEGIN
95
     IF NOT A THEN
96
          FAILED ("IMPROPER VALUE FOR 'CONSTRAINED OUTSIDE THE " &
97
                  "PACKAGE DECLARING THE PRIVATE TYPE - 1");
98
     END IF;
99
 
100
     IF B THEN
101
          FAILED ("IMPROPER VALUE FOR 'CONSTRAINED OUTSIDE THE " &
102
                  "PACKAGE DECLARING THE PRIVATE TYPE - 2");
103
     END IF;
104
 
105
     RESULT;
106
END C74208B;

powered by: WebSVN 2.1.0

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