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/] [cd/] [cd1009u.tst] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CD1009U.TST
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 A 'STORAGE_SIZE' CLAUSE MAY BE GIVEN IN THE PRIVATE
27
--     PART OF A PACKAGE FOR A LIMITED PRIVATE TYPE, WHOSE FULL TYPE
28
--     DECLARATION IS A TASK TYPE, DECLARED IN THE VISIBLE PART OF THE
29
--     SAME PACKAGE.
30
 
31
-- MACRO SUBSTITUTION:
32
--     $TASK_STORAGE_SIZE IS THE NUMBER OF STORAGE_UNITS REQUIRED FOR
33
--     THE ACTIVATION OF A TASK.
34
 
35
-- HISTORY:
36
--     VCL  10/09/87  CREATED ORIGINAL TEST.
37
--     DHH  03/30/89  CHANGED SPECIFIED_SIZE TO A MACRO VALUE AND CHANGED
38
--                    EXTENSION FROM '.DEP' TO '.TST'.
39
 
40
WITH REPORT; USE REPORT;
41
PROCEDURE CD1009U IS
42
BEGIN
43
     TEST ("CD1009U", "A 'STORAGE_SIZE' CLAUSE MAY BE GIVEN IN THE " &
44
                      "PRIVATE PART OF A PACKAGE FOR A LIMITED " &
45
                      "PRIVATE TYPE, WHOSE FULL TYPE DECLARATION IS " &
46
                      "A TASK TYPE, DECLARED IN THE VISIBLE PART OF " &
47
                      "THE SAME PACKAGE");
48
     DECLARE
49
          PACKAGE PACK IS
50
               SPECIFIED_SIZE : CONSTANT := $TASK_STORAGE_SIZE;
51
 
52
               TYPE CHECK_TYPE_1 IS LIMITED PRIVATE;
53
 
54
               PROCEDURE P;
55
          PRIVATE
56
               TASK TYPE CHECK_TYPE_1 IS
57
               END CHECK_TYPE_1;
58
 
59
               FOR CHECK_TYPE_1'STORAGE_SIZE USE SPECIFIED_SIZE;
60
          END PACK;
61
 
62
          PACKAGE BODY PACK IS
63
               PROCEDURE P IS
64
               BEGIN
65
                    IF CHECK_TYPE_1'STORAGE_SIZE < SPECIFIED_SIZE THEN
66
                         FAILED ("CHECK_TYPE_1'STORAGE_SIZE IS TOO " &
67
                                 "SMALL");
68
                    END IF;
69
               END P;
70
 
71
               TASK BODY CHECK_TYPE_1 IS
72
                    I : INTEGER;
73
               BEGIN
74
                    NULL;
75
               END CHECK_TYPE_1;
76
          END PACK;
77
 
78
          USE PACK;
79
     BEGIN
80
          P;
81
     END;
82
 
83
     RESULT;
84
END CD1009U;

powered by: WebSVN 2.1.0

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