OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c35508b.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C35508B.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 THE ATTRIBUTE 'WIDTH' YIELDS THE CORRECT RESULTS WHEN 
26
-- THE PREFIX IS A GENERIC FORMAL DISCRETE TYPE WHOSE ACTUAL 
27
-- PARAMETER IS A BOOLEAN TYPE.   
28
 
29
-- RJW 3/19/86  COMPLETELY REVISED.
30
 
31
WITH REPORT; USE REPORT;
32
 
33
PROCEDURE  C35508B  IS
34
 
35
BEGIN
36
 
37
     TEST( "C35508B" , "CHECK THAT THE ATTRIBUTE 'WIDTH' YIELDS " &
38
                       "THE CORRECT RESULTS WHEN THE PREFIX IS A " &
39
                       "GENERIC FORMAL DISCRETE TYPE WHOSE ACTUAL " &
40
                       "PARAMETER IS A BOOLEAN TYPE" );
41
 
42
     DECLARE
43
          SUBTYPE FRANGE IS BOOLEAN
44
               RANGE IDENT_BOOL(FALSE) .. IDENT_BOOL(FALSE);
45
          SUBTYPE TRANGE IS BOOLEAN
46
               RANGE IDENT_BOOL(TRUE) .. IDENT_BOOL(TRUE);
47
          TYPE NEWBOOL IS NEW BOOLEAN;
48
 
49
          GENERIC
50
               TYPE B IS (<>);
51
               W : INTEGER;
52
          PROCEDURE P (STR : STRING);
53
 
54
          PROCEDURE P (STR : STRING) IS
55
               SUBTYPE NOBOOL IS B RANGE
56
                    B'VAL (IDENT_INT(1)) .. B'VAL (IDENT_INT(0));
57
          BEGIN
58
               IF B'WIDTH /= W THEN
59
                    FAILED ( "INCORRECT B'WIDTH FOR " & STR );
60
               END IF;
61
               IF NOBOOL'WIDTH /= 0 THEN
62
                    FAILED ( "INCORRECT NOBOOL'WIDTH FOR " & STR );
63
               END IF;
64
          END P;
65
 
66
          PROCEDURE PROC1 IS NEW P (BOOLEAN, 5);
67
          PROCEDURE PROC2 IS NEW P (FRANGE, 5);
68
          PROCEDURE PROC3 IS NEW P (TRANGE, 4);
69
          PROCEDURE PROC4 IS NEW P (NEWBOOL, 5);
70
 
71
     BEGIN
72
          PROC1 ( "BOOLEAN" );
73
          PROC2 ( "FRANGE" );
74
          PROC3 ( "TRANGE");
75
          PROC4 ( "NEWBOOL" );
76
     END;
77
 
78
     RESULT;
79
END C35508B;

powered by: WebSVN 2.1.0

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