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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C87B62D.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 OVERLOADING RESOLUTION USES THE RULE THAT:
27
--
28
--       IN A LENGTH CLAUSE THAT SPECIFIES 'STORAGE_SIZE,
29
--       THE EXPRESSION MUST BE OF SOME INTEGER TYPE.
30
--       TASK TYPE IS HERE; ACCESS TYPE IS IN C87B62B.DEP.
31
 
32
-- MACRO SUBSTITUTION:
33
--     $TASK_STORAGE_SIZE IS THE NUMBER OF STORAGE_UNITS REQUIRED FOR
34
--     THE ACTIVATION OF A TASK.
35
 
36
-- HISTORY:
37
--     TRH 09/08/82  CREATED ORIGINAL TEST.
38
--     EG  06/04/84
39
--     PWB 01/19/86  CREATED THIS TEST FILE FROM THE TASK TYPE PART
40
--                   OF THE OLD C87B62B;
41
--                   CLARIFIED COMMENTS REGARDING NON-APPLICABILITY.
42
--     BCB 01/04/88  MODIFIED HEADER.
43
--     PWB 05/11/89  CHANGED EXTENSION FROM '.DEP' TO '.TST'.
44
 
45
WITH REPORT; USE REPORT;
46
 
47
PROCEDURE C87B62D IS
48
 
49
     TASK_STORAGE_SIZE : CONSTANT := $TASK_STORAGE_SIZE;
50
 
51
     TYPE POS_INT IS NEW INTEGER RANGE 0 .. INTEGER'LAST;
52
     TYPE POS_FIX IS DELTA 0.1 RANGE 0.0 .. 10.0;
53
     TYPE NUMERAL IS NEW CHARACTER RANGE '0' .. '9';
54
     TYPE BASE_5  IS ('0', '1', '2', '3', '4');
55
     ERR : BOOLEAN := FALSE;
56
 
57
     FUNCTION F (X : INTEGER) RETURN NUMERAL IS
58
     BEGIN
59
          ERR := TRUE;
60
          RETURN ('9');
61
     END F;
62
 
63
     FUNCTION F (X : INTEGER) RETURN BASE_5 IS
64
     BEGIN
65
          ERR := TRUE;
66
          RETURN ('4');
67
     END F;
68
 
69
     FUNCTION F (X : INTEGER) RETURN POS_FIX IS
70
     BEGIN
71
          ERR := TRUE;
72
          RETURN POS_FIX (X);
73
     END F;
74
 
75
     FUNCTION F (X : INTEGER) RETURN POS_INT IS
76
     BEGIN
77
          RETURN POS_INT (X);
78
     END F;
79
 
80
BEGIN
81
     TEST ("C87B62D","OVERLOADED EXPRESSION WITHIN LENGTH CLAUSE " &
82
           "- SPECIFICATION OF ATTRIBUTE T'STORAGE_SIZE " &
83
           "FOR TASK TYPES ");
84
 
85
     DECLARE
86
 
87
          TASK TYPE TSK1  IS
88
          END TSK1;
89
 
90
          FOR TSK1'STORAGE_SIZE USE F (TASK_STORAGE_SIZE);
91
 
92
          TASK BODY TSK1 IS
93
          BEGIN
94
               NULL;
95
          END TSK1;
96
 
97
     BEGIN
98
          IF ERR THEN
99
               FAILED ("RESOLUTION INCORRECT FOR EXPRESSION IN " &
100
                       "LENGTH CLAUSE USING 'STORAGE_SIZE");
101
          END IF;
102
     END;
103
 
104
     RESULT;
105
END C87B62D;

powered by: WebSVN 2.1.0

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