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

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

Line No. Rev Author Line
1 294 jeremybenn
-- C85014C.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 THE PRESENCE OR ABSENCE OF A RESULT TYPE IS USED TO
27
--     DETERMINE WHICH SUBPROGRAM OR ENTRY IS BEING RENAMED.
28
 
29
-- HISTORY:
30
--     JET 03/24/88  CREATED ORIGINAL TEST.
31
 
32
WITH REPORT; USE REPORT;
33
PROCEDURE C85014C IS
34
 
35
     I, J : INTEGER;
36
 
37
     TASK TYPE T IS
38
          ENTRY Q (I1 : INTEGER);
39
     END T;
40
 
41
     TASK0 : T;
42
 
43
     PACKAGE FUNC IS
44
          FUNCTION Q (I1 : INTEGER) RETURN INTEGER;
45
          FUNCTION FUNC RETURN T;
46
     END FUNC;
47
     USE FUNC;
48
 
49
     PROCEDURE PROC (I1: INTEGER) IS
50
     BEGIN
51
          I := I1;
52
     END PROC;
53
 
54
     FUNCTION PROC (I1: INTEGER) RETURN INTEGER IS
55
     BEGIN
56
          I := I1 + 1;
57
          RETURN 0;
58
     END PROC;
59
 
60
     TASK BODY T IS
61
     BEGIN
62
          ACCEPT Q (I1 : INTEGER) DO
63
               I := I1;
64
          END Q;
65
     END T;
66
 
67
     PACKAGE BODY FUNC IS
68
          FUNCTION Q (I1 : INTEGER) RETURN INTEGER IS
69
          BEGIN
70
               I := I1 + 1;
71
               RETURN 0;
72
          END Q;
73
 
74
          FUNCTION FUNC RETURN T IS
75
          BEGIN
76
               RETURN TASK0;
77
          END FUNC;
78
     END FUNC;
79
 
80
BEGIN
81
     TEST ("C85014C", "CHECK THAT THE PRESENCE OR ABSENCE OF A " &
82
                      "RESULT TYPE IS USED TO DETERMINE WHICH " &
83
                      "SUBPROGRAM OR ENTRY IS BEING RENAMED");
84
 
85
     DECLARE
86
          PROCEDURE PROC1 (J1: INTEGER) RENAMES PROC;
87
 
88
          FUNCTION PROC2 (J1: INTEGER) RETURN INTEGER RENAMES PROC;
89
     BEGIN
90
          PROC1(1);
91
          IF I /= IDENT_INT(1) THEN
92
               FAILED("INCORRECT VALUE OF I AFTER PROC1");
93
          END IF;
94
 
95
          J := PROC2(1);
96
          IF I /= IDENT_INT(2) THEN
97
               FAILED("INCORRECT VALUE OF I AFTER PROC2");
98
          END IF;
99
     END;
100
 
101
     DECLARE
102
          PROCEDURE FUNC1 (J1 : INTEGER) RENAMES FUNC.FUNC.Q;
103
 
104
          FUNCTION FUNC2 (J1 : INTEGER) RETURN INTEGER RENAMES FUNC.Q;
105
     BEGIN
106
          FUNC1(1);
107
          IF I /= IDENT_INT(1) THEN
108
               FAILED("INCORRECT VALUE OF I AFTER FUNC1");
109
          END IF;
110
 
111
          J := FUNC2(1);
112
          IF I /= IDENT_INT(2) THEN
113
               FAILED("INCORRECT VALUE OF I AFTER FUNC2");
114
          END IF;
115
     END;
116
 
117
     RESULT;
118
END C85014C;

powered by: WebSVN 2.1.0

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