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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C86004A.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 IF A LIBRARY SUBPROGRAM DECLARATION IS PRECEDED BY A
27
--     "WITH" CLAUSE FOR A GENERIC LIBRARY PROCEDURE M, THEN IN THE
28
--     BODY OF THE SUBPROGRAM, "STANDARD.M" IS A LEGAL NAME
29
--     FOR THE GENERIC PROCEDURE.
30
 
31
-- HISTORY:
32
--     DHH 03/14/88 CREATED ORIGINAL TEST.
33
 
34
-- BEGIN BUILDING LIBRARY PROCEDURES
35
 
36
GENERIC
37
     TYPE ITEM IS (<>);
38
PROCEDURE C86004A_SWAP(X,Y: IN OUT ITEM);
39
 
40
PROCEDURE C86004A_SWAP(X,Y: IN OUT ITEM) IS
41
     T : ITEM;
42
BEGIN
43
     T := X;
44
     X := Y;
45
     Y := T;
46
END C86004A_SWAP;
47
 
48
WITH C86004A_SWAP; WITH REPORT; USE REPORT;
49
PROCEDURE C86004A1 IS
50
     SUBTYPE INT IS INTEGER RANGE 0 .. 10;
51
     A : INT := IDENT_INT(10);
52
     B : INT := IDENT_INT(0);
53
     PROCEDURE SWITCH IS NEW STANDARD.C86004A_SWAP(INT);
54
BEGIN
55
     SWITCH(A,B);
56
 
57
     IF A /= IDENT_INT(0) THEN
58
          FAILED("STANDARD.GENERIC PROCEDURE - 1");
59
     END IF;
60
 
61
     IF B /= IDENT_INT(10) THEN
62
          FAILED("STANDARD.GENERIC PROCEDURE - 2");
63
     END IF;
64
END C86004A1;
65
 
66
WITH C86004A_SWAP; WITH REPORT; USE REPORT;
67
PROCEDURE C86004A2;
68
 
69
PROCEDURE C86004A2 IS
70
     SUBTYPE INT IS INTEGER RANGE 0 .. 10;
71
     A : INT := IDENT_INT(10);
72
     B : INT := IDENT_INT(0);
73
BEGIN
74
     DECLARE
75
          PROCEDURE SWITCH IS NEW STANDARD.C86004A_SWAP(INT);
76
     BEGIN
77
          SWITCH(A,B);
78
     END;
79
     IF A /= IDENT_INT(0) THEN
80
          FAILED("STANDARD.GENERIC PROCEDURE - B-0");
81
     END IF;
82
     IF B /= IDENT_INT(10) THEN
83
          FAILED("STANDARD.GENERIC PROCEDURE - B-10");
84
     END IF;
85
END C86004A2;
86
 
87
WITH C86004A1; WITH C86004A2;
88
WITH REPORT; USE REPORT;
89
PROCEDURE C86004A IS
90
BEGIN
91
     TEST("C86004A", "CHECK THAT IF A LIBRARY SUBPROGRAM DECLARATION " &
92
                     "IS PRECEDED BY A ""WITH"" CLAUSE FOR A GENERIC " &
93
                     "LIBRARY PROCEDURE M, THEN IN THE BODY OF THE " &
94
                     "SUBPROGRAM, ""STANDARD.M"" IS A " &
95
                     "LEGAL NAME FOR THE GENERIC PROCEDURE");
96
     C86004A1;
97
     C86004A2;
98
 
99
     RESULT;
100
END C86004A;

powered by: WebSVN 2.1.0

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