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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c36174a.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C36174A.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 INDEX_CONSTRAINTS MAY BE OMITTED FOR CONSTANTS.
26
 
27
-- DAT 2/9/81
28
-- JBG 12/8/83
29
 
30
 
31
WITH REPORT;
32
PROCEDURE C36174A IS
33
 
34
     USE REPORT;
35
 
36
     S0 : CONSTANT STRING := "";
37
     S1 : CONSTANT STRING := S0;
38
     S2 : CONSTANT STRING := (1 .. 0 => 'Z');
39
     S3 : CONSTANT STRING := ('A', 'B', 'C');
40
     S4 : CONSTANT STRING := S3 & "ABC" & S3 & S2 & "Z";
41
     S9 : CONSTANT STRING := S0 & S1 & S2 & S3(3..1);
42
 
43
     TYPE A4 IS ARRAY(INTEGER RANGE <>, INTEGER RANGE <>,
44
          INTEGER RANGE <>, INTEGER RANGE <>) OF STRING (1 .. 0);
45
     C4 : CONSTANT A4 :=
46
          (-6 .. -4 =>
47
               (4 .. 5 =>
48
                    (-4 .. -5 =>
49
                         (1000 .. 2000 =>
50
                              S9))));
51
     S10 : CONSTANT STRING := (10 .. 9 => 'Q');
52
 
53
     TYPE I_12 IS NEW INTEGER RANGE 10 .. 12;
54
     TYPE A_12 IS ARRAY (I_12 RANGE <>, I_12 RANGE <>) OF I_12;
55
     A12 : CONSTANT A_12 :=
56
          (11 .. 12 => (10 .. 10 => 10));
57
     B12 : CONSTANT A_12 :=
58
          (11 => (10 | 12 => 10, 11 => 11),
59
           10 => (10 | 12 | 11 => 12));
60
 
61
     N6 : CONSTANT INTEGER := IDENT_INT (6);
62
     S6 : CONSTANT STRING := (N6 .. N6 + 6 => 'Z');
63
     S7 : CONSTANT STRING := S6 (N6 .. N6 + IDENT_INT (-1));
64
 
65
BEGIN
66
     TEST ("C36174A", "INDEX_CONSTRAINTS MAY BE OMITTED FOR CONSTANTS");
67
 
68
     IF S0'FIRST /= 1 OR S0'LAST /= 0
69
     OR S1'FIRST /= 1 OR S1'LAST /= 0
70
     OR S2'FIRST /= 1 OR S2'LAST /= 0
71
     OR S3'FIRST /= 1 OR S3'LAST /= 3
72
     THEN
73
          FAILED ("INVALID STRING CONSTANT BOUNDS 1");
74
     END IF;
75
 
76
     IF S4'FIRST /= 1 OR S4'LAST /= 10 THEN
77
          FAILED ("INVALID STRING CONSTANT BOUNDS 2");
78
     END IF;
79
 
80
     IF S9'FIRST /= 3 OR S9'LAST /= 1 THEN
81
          FAILED ("INVALID STRING CONSTANT BOUNDS 3");
82
     END IF;
83
 
84
     IF C4'FIRST(1) /= -6 OR C4'LAST(1) /= -4
85
     OR C4'FIRST(2) /= 4 OR C4'LAST(2) /= 5
86
     OR C4'FIRST(3) /= -4 OR C4'LAST(3) /= -5
87
     OR C4'FIRST(4) /= 1000 OR C4'LAST(4) /= 2000
88
     THEN
89
          FAILED ("INVALID ARRAY CONSTANT BOUNDS");
90
     END IF;
91
 
92
     IF S10'FIRST /= 10 OR S10'LAST /= 9
93
     THEN
94
          FAILED ("INVALID STRING CONSTANT BOUNDS 10");
95
     END IF;
96
 
97
     IF A12'FIRST /= 11 OR A12'LAST /= 12
98
     OR A12'FIRST(2) /= 10 OR A12'LAST(2) /= 10
99
     THEN FAILED ("INVALID ARRAY CONSTANT BOUNDS 2");
100
     END IF;
101
 
102
     IF B12'FIRST /= 10 OR B12'LAST /= 11
103
     OR B12'FIRST(2) /= 10 OR B12'LAST(2) /= 12
104
     THEN
105
          FAILED ("INVALID ARRAY CONSTANT BOUNDS 3");
106
     END IF;
107
 
108
     IF S6'FIRST /= 6 OR S6'LAST /= 12 OR S6'LENGTH /= 7
109
     THEN
110
          FAILED ("INVALID STRING CONSTANT  BOUNDS 12");
111
     END IF;
112
 
113
     IF S7'FIRST /= 6 OR S7'LAST /= 5 THEN
114
          FAILED ("INVALID STRING CONSTANT BOUNDS 13");
115
     END IF;
116
 
117
     RESULT;
118
END C36174A;

powered by: WebSVN 2.1.0

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