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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C36180A.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 AN INDEX CONSTRAINT CAN HAVE THE FORM A'RANGE,
27
--     WHERE A IS A PREVIOUSLY DECLARED ARRAY OBJECT OR CONSTRAINED
28
--     ARRAY SUBTYPE.
29
 
30
-- HISTORY:
31
--     BCB 01/21/88  CREATED ORIGINAL TEST.
32
 
33
WITH REPORT; USE REPORT;
34
 
35
PROCEDURE C36180A IS
36
 
37
     TYPE J IS ARRAY (INTEGER RANGE <>) OF INTEGER;
38
 
39
     TYPE K IS ARRAY (1..10) OF INTEGER;
40
 
41
     SUBTYPE A IS J (0 .. 50);
42
 
43
     SUBTYPE W IS J (A'RANGE);
44
 
45
     SUBTYPE X IS J (K'RANGE);
46
 
47
     TYPE Y IS ACCESS J;
48
 
49
     TYPE Z IS ACCESS J;
50
 
51
     TYPE F IS NEW J (A'RANGE);
52
 
53
     TYPE G IS NEW J (K'RANGE);
54
 
55
     B : ARRAY (A'RANGE) OF INTEGER;
56
 
57
     C : ARRAY (K'RANGE) OF INTEGER;
58
 
59
     D : ARRAY (1 .. 10) OF INTEGER;
60
 
61
     E : ARRAY (D'RANGE) OF INTEGER;
62
 
63
     H : J (A'RANGE);
64
 
65
     I : J (K'RANGE);
66
 
67
     L : J (D'RANGE);
68
 
69
     V1 : W;
70
 
71
     V2 : X;
72
 
73
     V3 : Y := NEW J (A'RANGE);
74
 
75
     V4 : Z := NEW J (K'RANGE);
76
 
77
     V5 : F;
78
 
79
     V6 : G;
80
 
81
BEGIN
82
     TEST ("C36180A", "CHECK THAT AN INDEX CONSTRAINT CAN HAVE THE " &
83
                      "FORM A'RANGE, WHERE A IS A PREVIOUSLY " &
84
                      "DECLARED ARRAY OBJECT OR CONSTRAINED ARRAY " &
85
                      "SUBTYPE");
86
 
87
     IF B'FIRST /= IDENT_INT (0) OR B'LAST /= IDENT_INT (50)
88
          THEN FAILED ("IMPROPER VALUE FOR B'FIRST OR B'LAST");
89
     END IF;
90
 
91
     IF C'FIRST /= IDENT_INT (1) OR C'LAST /= IDENT_INT (10)
92
          THEN FAILED ("IMPROPER VALUE FOR C'FIRST OR C'LAST");
93
     END IF;
94
 
95
     IF E'FIRST /= IDENT_INT (1) OR E'LAST /= IDENT_INT (10)
96
          THEN FAILED ("IMPROPER VALUE FOR E'FIRST OR E'LAST");
97
     END IF;
98
 
99
     IF H'FIRST /= IDENT_INT (0) OR H'LAST /= IDENT_INT (50)
100
          THEN FAILED ("IMPROPER VALUE FOR H'FIRST OR H'LAST");
101
     END IF;
102
 
103
     IF I'FIRST /= IDENT_INT (1) OR I'LAST /= IDENT_INT (10)
104
          THEN FAILED ("IMPROPER VALUE FOR I'FIRST OR I'LAST");
105
     END IF;
106
 
107
     IF L'FIRST /= IDENT_INT (1) OR L'LAST /= IDENT_INT (10)
108
          THEN FAILED ("IMPROPER VALUE FOR L'FIRST OR L'LAST");
109
     END IF;
110
 
111
     IF V1'FIRST /= IDENT_INT (0) OR V1'LAST /= IDENT_INT (50)
112
          THEN FAILED ("IMPROPER VALUE FOR V1'FIRST OR V1'LAST");
113
     END IF;
114
 
115
     IF V2'FIRST /= IDENT_INT (1) OR V2'LAST /= IDENT_INT (10)
116
          THEN FAILED ("IMPROPER VALUE FOR V2'FIRST OR V2'LAST");
117
     END IF;
118
 
119
     IF V3.ALL'FIRST /= IDENT_INT (0) OR V3.ALL'LAST /= IDENT_INT (50)
120
          THEN FAILED ("IMPROPER VALUE FOR V3'FIRST OR V3'LAST");
121
     END IF;
122
 
123
     IF V4.ALL'FIRST /= IDENT_INT (1) OR V4.ALL'LAST /= IDENT_INT (10)
124
          THEN FAILED ("IMPROPER VALUE FOR V4'FIRST OR V4'LAST");
125
     END IF;
126
 
127
     IF V5'FIRST /= IDENT_INT (0) OR V5'LAST /= IDENT_INT (50)
128
          THEN FAILED ("IMPROPER VALUE FOR V5'FIRST OR V5'LAST");
129
     END IF;
130
 
131
     IF V6'FIRST /= IDENT_INT (1) OR V6'LAST /= IDENT_INT (10)
132
          THEN FAILED ("IMPROPER VALUE FOR V6'FIRST OR V6'LAST");
133
     END IF;
134
 
135
     RESULT;
136
END C36180A;

powered by: WebSVN 2.1.0

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