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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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