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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C85007E.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
-- CHECK THAT A RENAMED OUT PARAMETER, OUT PARAMETER COMPONENT, OR
26
-- OUT PARAMETER SLICE CAN BE ASSIGNED TO.
27
 
28
-- EG  02/22/84
29
 
30
WITH REPORT;
31
 
32
PROCEDURE C85007E IS
33
 
34
     USE REPORT;
35
 
36
BEGIN
37
 
38
     TEST("C85007E","CHECK THAT A RENAMED OUT PARAMETER, PARAMETER " &
39
                    "COMPONENT, OR PARAMETER SLICE CAN BE ASSIGNED TO");
40
 
41
     DECLARE
42
 
43
          TYPE AT1 IS ARRAY(1 .. 3) OF INTEGER;
44
          TYPE RT (A : INTEGER) IS
45
               RECORD
46
                    B : AT1;
47
                    C : INTEGER;
48
               END RECORD;
49
 
50
          A1, B1 : INTEGER;
51
          A2, B2 : AT1;
52
          A3, B3 : RT(1);
53
 
54
          PROCEDURE PROC1 (A : OUT INTEGER;
55
                           B : OUT AT1;
56
                           C : OUT RT) IS
57
 
58
               AA : INTEGER RENAMES A;
59
               BB : AT1     RENAMES B;
60
               CC : RT      RENAMES C;
61
 
62
          BEGIN
63
 
64
               AA := -1;
65
               BB := (1 .. 3 => -2);
66
               CC := (1, (2, 3, 4), 5);
67
 
68
          END PROC1;
69
 
70
          PROCEDURE PROC2 (X : OUT AT1;
71
                           Y : OUT INTEGER;
72
                           Z : OUT RT) IS
73
 
74
               XX : AT1     RENAMES X;
75
               YY : INTEGER RENAMES Y;
76
               ZZ : RT      RENAMES Z;
77
 
78
          BEGIN
79
 
80
               PROC1 (YY, XX, ZZ);
81
 
82
          END PROC2;
83
 
84
     BEGIN
85
 
86
          PROC1 (A1, A2, A3);
87
          IF A1 /= IDENT_INT(-1) OR A2 /= (1 .. 3 => IDENT_INT(-2)) OR
88
             A3 /= (1, (2, 3, 4), IDENT_INT(5)) THEN
89
               FAILED ("CASE 1 : ERROR IN ASSIGNMENT");
90
          END IF;
91
 
92
          PROC2 (B2, B1, B3);
93
          IF B1 /= IDENT_INT(-1) OR B2 /= (1 .. 3 => IDENT_INT(-2)) OR
94
             B3 /= (1, (2, 3, 4), IDENT_INT(5)) THEN
95
               FAILED ("CASE 2 : ERROR IN ASSIGNMENT");
96
          END IF;
97
 
98
     END;
99
 
100
     RESULT;
101
 
102
END C85007E;

powered by: WebSVN 2.1.0

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