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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C45672A.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 "NOT" YIELDS THE CORRECT RESULTS WHEN APPLIED TO
26
-- ONE-DIMENSIONAL BOOLEAN ARRAYS.
27
 
28
-- JWC 11/15/85
29
 
30
WITH REPORT;USE REPORT;
31
 
32
PROCEDURE C45672A IS
33
BEGIN
34
 
35
     TEST ("C45672A", "CHECK THE UNARY OPERATOR 'NOT' APPLIED TO " &
36
                      "ONE-DIMENSIONAL BOOLEAN ARRAYS");
37
 
38
     DECLARE
39
 
40
          TYPE ARR1 IS ARRAY (INTEGER RANGE 1 .. 4) OF BOOLEAN;
41
          TYPE ARR2 IS ARRAY (INTEGER RANGE 1 .. 40) OF BOOLEAN;
42
          TYPE ARR3 IS ARRAY (INTEGER RANGE <>) OF BOOLEAN;
43
          TYPE ARR4 IS ARRAY (INTEGER RANGE 1 .. 4) OF BOOLEAN;
44
          TYPE ARR5 IS ARRAY (INTEGER RANGE 1 .. 40) OF BOOLEAN;
45
 
46
          PRAGMA PACK (ARR4);
47
          PRAGMA PACK (ARR5);
48
 
49
          A1 : ARR1 := ARR1'(1 | 3 => TRUE, OTHERS => FALSE);
50
          A2 : ARR2 := ARR2'(1 | 14 .. 18 | 30 .. 33 | 35 .. 37 => TRUE,
51
                             OTHERS => FALSE);
52
          A3 : ARR3(IDENT_INT(3) .. IDENT_INT(4)) := ARR3'(TRUE, FALSE);
53
          A4 : ARR4 := ARR4'(1 | 3 => TRUE, OTHERS => FALSE);
54
          A5 : ARR5 := ARR5'(1 | 14 .. 18 | 30 .. 33 | 35 .. 37 => TRUE,
55
                             OTHERS => FALSE);
56
          A6 : ARR3 (IDENT_INT(9) .. IDENT_INT(7));
57
 
58
          PROCEDURE P (A : ARR3; F : INTEGER; L : INTEGER) IS
59
          BEGIN
60
               IF A'FIRST /= F OR A'LAST /= L THEN
61
                    FAILED ("'NOT' YIELDED THE WRONG BOUNDS");
62
               END IF;
63
          END P;
64
 
65
     BEGIN
66
 
67
          P (NOT A3, 3, 4);
68
          P (NOT A6, 9, 7);
69
 
70
          IF NOT A1 /= ARR1'(1 | 3 => FALSE, OTHERS => TRUE) THEN
71
               FAILED ("WRONG RESULT WHEN 'NOT' APPLIED " &
72
                       "TO SMALL ARRAY");
73
          END IF;
74
 
75
          IF NOT A2 /= ARR2'(1 | 14 .. 18 | 30 .. 33 | 35 .. 37
76
                             => FALSE, OTHERS => TRUE) THEN
77
               FAILED ("WRONG RESULT WHEN 'NOT' APPLIED " &
78
                       "TO LARGE ARRAY");
79
          END IF;
80
 
81
          IF NOT A4 /= ARR4'(1 | 3 => FALSE, OTHERS => TRUE) THEN
82
               FAILED ("WRONG RESULT WHEN 'NOT' APPLIED " &
83
                       "TO SMALL PACKED ARRAY");
84
          END IF;
85
 
86
          IF NOT A5 /= ARR5'(1 | 14 .. 18 | 30 .. 33 | 35 .. 37
87
                             => FALSE, OTHERS => TRUE) THEN
88
               FAILED ("WRONG RESULT WHEN 'NOT' APPLIED " &
89
                       "TO LARGE PACKED ARRAY");
90
          END IF;
91
 
92
          IF "NOT" (RIGHT => A1) /= ARR1'(1 | 3 => FALSE,
93
                                          OTHERS => TRUE) THEN
94
               FAILED ("WRONG RESULT WHEN 'NOT' APPLIED " &
95
                       "TO SMALL ARRAY USING NAMED NOTATION");
96
          END IF;
97
 
98
          IF "NOT" (RIGHT => A5) /= ARR5'(1 | 14 .. 18 | 30 .. 33 |
99
                                          35 .. 37 => FALSE,
100
                                          OTHERS => TRUE) THEN
101
               FAILED ("WRONG RESULT WHEN 'NOT' APPLIED TO LARGE " &
102
                       "PACKED ARRAY USING NAMED NOTATION");
103
          END IF;
104
 
105
     END;
106
 
107
     RESULT;
108
 
109
END C45672A;

powered by: WebSVN 2.1.0

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