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

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

Line No. Rev Author Line
1 149 jeremybenn
-- C43204H.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 A GENERIC UNIT, AND THAT THE
28
--     BOUNDS 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 C43204H 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
     GENERIC
49
          GA11 : ARR11 := (1,1,1,1,1, OTHERS => IDENT_INT(2));
50
          GA12 : ARR12 := (OTHERS => IDENT_INT(2));
51
          GA13 : ARR13 := (OTHERS => IDENT_INT(2));
52
          GA21 : ARR21 := ((1,1,1), (1,1,1), (OTHERS => IDENT_INT(2)));
53
          GA22 : ARR22 := ((1,1,1), (OTHERS => IDENT_INT(2)), (1,1,1));
54
          GA23 : ARR23 := ((1,1,1), (OTHERS => IDENT_INT(2)), (1,1,1));
55
          GA24 : ARR24 := (OTHERS => (OTHERS => IDENT_INT(2)));
56
     PROCEDURE GEN;
57
 
58
     PROCEDURE GEN IS
59
     BEGIN
60
          IF GA11 /= (1, 1, 1, 1, 1, 2, 2) THEN
61
               FAILED("INCORRECT VALUE OF GA11");
62
          END IF;
63
 
64
          IF GA12 /= (2, 2, 2, 2, 2, 2, 2) THEN
65
               FAILED("INCORRECT VALUE OF GA12");
66
          END IF;
67
 
68
          IF GA13'LENGTH /= 0 THEN
69
               FAILED("INCORRECT VALUE OF GA13");
70
          END IF;
71
 
72
          IF GA21 /= ((1,1,1), (1,1,1), (2,2,2)) THEN
73
               FAILED("INCORRECT VALUE OF GA21");
74
          END IF;
75
 
76
          IF GA22 /= ((1,1,1), (2,2,2), (1,1,1)) THEN
77
               FAILED("INCORRECT VALUE OF GA22");
78
          END IF;
79
 
80
          IF GA23 /= ((1,1,1), (2,2,2), (1,1,1)) THEN
81
               FAILED("INCORRECT VALUE OF GA23");
82
          END IF;
83
 
84
          IF GA24'LENGTH /= 0 OR GA24'LENGTH(2) /= 3 THEN
85
               FAILED("INCORRECT VALUE OF GA24");
86
          END IF;
87
     END GEN;
88
 
89
     PROCEDURE PROCG IS NEW GEN;
90
 
91
BEGIN
92
     TEST ("C43204H", "CHECK THAT AN AGGREGATE WITH AN OTHERS CLAUSE " &
93
                      "CAN APPEAR AS A CONSTRAINED FORMAL PARAMETER " &
94
                      "OF A GENERIC UNIT, AND THAT THE BOUNDS OF " &
95
                      "THE AGGREGATE ARE DETERMINED CORRECTLY");
96
 
97
     PROCG;
98
 
99
     RESULT;
100
 
101
EXCEPTION
102
     WHEN OTHERS =>
103
          FAILED ("UNEXPECTED CONSTRAINT_ERROR OR OTHER EXCEPTION " &
104
                  "RAISED");
105
 
106
          RESULT;
107
END C43204H;

powered by: WebSVN 2.1.0

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