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/] [c6/] [c64004g.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
-- C64004G.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 FOR CALLS TO SUBPROGRAMS HAVING AT LEAST ONE DEFAULT
26
--   PARAMETER, THE CORRECT ASSOCIATION IS MADE BETWEEN ACTUAL AND
27
--   FORMAL PARAMETERS.
28
 
29
-- DAS  1/27/81
30
 
31
 
32
WITH REPORT;
33
PROCEDURE C64004G IS
34
 
35
     USE REPORT;
36
 
37
     Y1,Y2,Y3  : INTEGER := 0;
38
     O1,O2     : INTEGER := 0;
39
 
40
     PROCEDURE P (I1: INTEGER; I2: INTEGER := 2; I3: INTEGER := 3;
41
                  O1,O2,O3: OUT INTEGER) IS
42
     BEGIN
43
          O1 := I1;
44
          O2 := I2;
45
          O3 := I3;
46
     END P;
47
 
48
     FUNCTION F (I1: INTEGER := 1; I2: INTEGER) RETURN INTEGER IS
49
     BEGIN
50
          C64004G.O1 := I1;
51
          C64004G.O2 := I2;
52
          RETURN 1;
53
     END F;
54
 
55
BEGIN
56
 
57
     TEST ("C64004G", "CHECK ASSOCIATIONS BETWEEN ACTUAL AND FORMAL" &
58
                      " PARAMETERS (HAVING DEFAULT VALUES)");
59
 
60
     P (I1=>11, I2=>12, I3=>13, O1=>Y1, O2=>Y2, O3=>Y3);
61
     IF (Y1 /= 11) OR (Y2 /= 12) OR (Y3 /= 13) THEN
62
          FAILED ("INCORRECT PARAMETER ASSOCIATION - 1");
63
     END IF;
64
 
65
     P (I1=>21, O1=>Y1, O2=>Y2, O3=>Y3);
66
     IF (Y1 /= 21) OR (Y2 /= 2) OR (Y3 /= 3) THEN
67
          FAILED ("INCORRECT PARAMETER ASSOCIATION - 2");
68
     END IF;
69
 
70
     P (O1=>Y1, O3=>Y3, I1=>31, I3=>33, O2=>Y2);
71
     IF (Y1 /= 31) OR (Y2 /= 2) OR (Y3 /= 33) THEN
72
          FAILED ("INCORRECT PARAMETER ASSOCIATION - 3");
73
     END IF;
74
 
75
     P (41, 42, O1=>Y1, O2=>Y2, O3=>Y3);
76
     IF (Y1 /= 41) OR (Y2 /= 42) OR (Y3 /= 3) THEN
77
          FAILED ("INCORRECT PARANETER ASSOCIATION - 4");
78
     END IF;
79
 
80
     P (51, O3=>Y3, O1=>Y1, O2=>Y2, I3=>53);
81
     IF (Y1 /= 51) OR (Y2 /= 2) OR (Y3 /= 53) THEN
82
          FAILED ("INCORRECT PARAMETER ASSOCIATION - 5");
83
     END IF;
84
 
85
     Y1 := F (I1=>61, I2=>62);
86
     IF (O1 /= 61) OR (O2 /= 62) THEN
87
          FAILED ("INCORRECT PARAMETER ASSOCIATION - 6");
88
     END IF;
89
 
90
     Y2 := F (I2=>72, I1=>71);
91
     IF (O1 /= 71) OR (O2 /= 72) THEN
92
          FAILED ("INCORRECT PARAMETER ASSOCIATION - 7");
93
     END IF;
94
 
95
     Y3 := F (I2=>82);
96
     IF (O1 /= 1) OR (O2 /= 82) THEN
97
          FAILED ("INCORRECT PARAMETER ASSOCIATION - 8");
98
     END IF;
99
 
100
     RESULT;
101
 
102
END C64004G;

powered by: WebSVN 2.1.0

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