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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C43204I.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 AGGREGATE WITH AN OTHERS CLAUSE CAN APPEAR AS THE
27
--     EXPRESSION IN AN ASSIGNMENT STATEMENT, AND THAT THE BOUNDS OF
28
--     THE AGGREGATE ARE DETERMINED CORRECTLY.
29
 
30
-- HISTORY:
31
--     JET 08/15/88  CREATED ORIGINAL TEST.
32
 
33
WITH REPORT; USE REPORT;
34
PROCEDURE C43204I IS
35
 
36
     TYPE ARR11 IS ARRAY (INTEGER RANGE -3 .. 3) OF INTEGER;
37
     TYPE ARR12 IS ARRAY (IDENT_INT(-3) .. IDENT_INT(3)) OF INTEGER;
38
     TYPE ARR13 IS ARRAY (IDENT_INT(1) .. IDENT_INT(-1)) OF INTEGER;
39
     TYPE ARR21 IS ARRAY (INTEGER RANGE -1 .. 1,
40
                          INTEGER RANGE -1 .. 1) OF INTEGER;
41
     TYPE ARR22 IS ARRAY (IDENT_INT(-1) .. IDENT_INT(1),
42
                          IDENT_INT(-1) .. IDENT_INT(1)) OF INTEGER;
43
     TYPE ARR23 IS ARRAY (INTEGER RANGE -1 .. 1,
44
                          IDENT_INT(-1) .. IDENT_INT(1)) OF INTEGER;
45
     TYPE ARR24 IS ARRAY (IDENT_INT(1) .. IDENT_INT(-1),
46
                          IDENT_INT(-1) .. IDENT_INT(1)) OF INTEGER;
47
 
48
     VA11 : ARR11;
49
     VA12 : ARR12;
50
     VA13 : ARR13;
51
     VA21 : ARR21;
52
     VA22 : ARR22;
53
     VA23 : ARR23;
54
     VA24 : ARR24;
55
 
56
BEGIN
57
     TEST ("C43204I", "CHECK THAT AN AGGREGATE WITH AN OTHERS CLAUSE " &
58
                      "CAN APPEAR AS THE EXPRESSION IN AN ASSIGNMENT " &
59
                      "STATEMENT, AND THAT THE BOUNDS OF THE " &
60
                      "AGGREGATE ARE DETERMINED CORRECTLY");
61
 
62
     VA11 := (1,1, OTHERS => IDENT_INT(2));
63
     VA12 := (OTHERS => IDENT_INT(2));
64
     VA13 := (OTHERS => IDENT_INT(2));
65
     VA21 := ((1,1,1), OTHERS => (-1..1 => IDENT_INT(2)));
66
     VA22 := (-1 => (1,1,1), 0..1 => (OTHERS => IDENT_INT(2)));
67
     VA23 := (OTHERS => (OTHERS => IDENT_INT(2)));
68
     VA24 := (OTHERS => (OTHERS => IDENT_INT(2)));
69
 
70
     IF VA11 /= (1, 1, 2, 2, 2, 2, 2) THEN
71
          FAILED("INCORRECT VALUE OF VA11");
72
     END IF;
73
 
74
     IF VA12 /= (2, 2, 2, 2, 2, 2, 2) THEN
75
          FAILED("INCORRECT VALUE OF VA12");
76
     END IF;
77
 
78
     IF VA13'LENGTH /= 0 THEN
79
          FAILED("INCORRECT VALUE OF VA13");
80
     END IF;
81
 
82
     IF VA21 /= ((1,1,1), (2,2,2), (2,2,2)) THEN
83
          FAILED("INCORRECT VALUE OF VA21");
84
     END IF;
85
 
86
     IF VA22 /= ((1,1,1), (2,2,2), (2,2,2)) THEN
87
          FAILED("INCORRECT VALUE OF VA22");
88
     END IF;
89
 
90
     IF VA23 /= ((2,2,2), (2,2,2), (2,2,2)) THEN
91
          FAILED("INCORRECT VALUE OF VA23");
92
     END IF;
93
 
94
     IF VA24'LENGTH /= 0 OR VA24'LENGTH(2) /= 3 THEN
95
          FAILED("INCORRECT VALUE OF VA24");
96
     END IF;
97
 
98
     RESULT;
99
 
100
EXCEPTION
101
     WHEN OTHERS =>
102
          FAILED ("UNEXPECTED CONSTRAINT_ERROR OR OTHER EXCEPTION " &
103
                  "RAISED");
104
 
105
          RESULT;
106
END C43204I;

powered by: WebSVN 2.1.0

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