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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C43204G.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 A
27
--     CONSTRAINED FORMAL PARAMETER OF AN ENTRY, AND THAT THE BOUNDS
28
--     OF THE AGGREGATE ARE DETERMINED CORRECTLY.
29
 
30
-- HISTORY:
31
--     JET 08/15/88  CREATED ORIGINAL TEST.
32
 
33
WITH REPORT; USE REPORT;
34
PROCEDURE C43204G 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
     TASK T IS
49
          ENTRY E (EA11 : ARR11 := (1,1,1,1, OTHERS => IDENT_INT(2));
50
                   EA12 : ARR12 := (OTHERS => IDENT_INT(2));
51
                   EA13 : ARR13 := (OTHERS => IDENT_INT(2));
52
                   EA21 : ARR21 := ((1,1,1), (1,1,1), (1,1,1),
53
                                    OTHERS => (-1..1 => IDENT_INT(2)));
54
                   EA22 : ARR22 := ((OTHERS => IDENT_INT(2)), (1,1,1),
55
                                    (1,1,1));
56
                   EA23 : ARR23 := (-1..0 => (OTHERS => 1),
57
                                    1 => (OTHERS => IDENT_INT(2)));
58
                   EA24: ARR24 := (OTHERS => (OTHERS => IDENT_INT(2))));
59
     END T;
60
 
61
     TASK BODY T IS
62
     BEGIN
63
          ACCEPT E (EA11 : ARR11 := (1,1,1,1, OTHERS => IDENT_INT(2));
64
                    EA12 : ARR12 := (OTHERS => IDENT_INT(2));
65
                    EA13 : ARR13 := (OTHERS => IDENT_INT(2));
66
                    EA21 : ARR21 := ((1,1,1), (1,1,1), (1,1,1),
67
                                     OTHERS => (-1..1 => IDENT_INT(2)));
68
                    EA22 : ARR22 := ((OTHERS => IDENT_INT(2)), (1,1,1),
69
                                     (1,1,1));
70
                    EA23 : ARR23 := (-1..0 => (OTHERS => 1),
71
                                     1 => (OTHERS => IDENT_INT(2)));
72
                    EA24 : ARR24 := (OTHERS => (OTHERS =>
73
                                    IDENT_INT(2))))
74
          DO
75
               IF EA11 /= (1, 1, 1, 1, 2, 2, 2) THEN
76
                    FAILED("INCORRECT VALUE OF EA11");
77
               END IF;
78
 
79
               IF EA12 /= (2, 2, 2, 2, 2, 2, 2) THEN
80
                    FAILED("INCORRECT VALUE OF EA12");
81
               END IF;
82
 
83
               IF EA13'LENGTH /= 0 THEN
84
                    FAILED("INCORRECT VALUE OF EA13");
85
               END IF;
86
 
87
               IF EA21 /= ((1,1,1), (1,1,1), (1,1,1)) THEN
88
                    FAILED("INCORRECT VALUE OF EA21");
89
               END IF;
90
 
91
               IF EA22 /= ((2,2,2), (1,1,1), (1,1,1)) THEN
92
                    FAILED("INCORRECT VALUE OF EA22");
93
               END IF;
94
 
95
               IF EA23 /= ((1,1,1), (1,1,1), (2,2,2)) THEN
96
                    FAILED("INCORRECT VALUE OF EA23");
97
               END IF;
98
 
99
               IF EA24'LENGTH /= 0 OR EA24'LENGTH(2) /= 3 THEN
100
                    FAILED("INCORRECT VALUE OF EA24");
101
               END IF;
102
          END E;
103
     END T;
104
 
105
BEGIN
106
     TEST ("C43204G", "CHECK THAT AN AGGREGATE WITH AN OTHERS CLAUSE " &
107
                      "CAN APPEAR AS A CONSTRAINED FORMAL PARAMETER " &
108
                      "OF AN ENTRY, AND THAT THE BOUNDS OF THE " &
109
                      "AGGREGATE ARE DETERMINED CORRECTLY");
110
 
111
     T.E;
112
 
113
     RESULT;
114
 
115
EXCEPTION
116
     WHEN OTHERS =>
117
          FAILED ("UNEXPECTED CONSTRAINT_ERROR OR OTHER EXCEPTION " &
118
                  "RAISED");
119
 
120
          IF T'CALLABLE THEN
121
               T.E;
122
          END IF;
123
 
124
          RESULT;
125
END C43204G;

powered by: WebSVN 2.1.0

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