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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CD7204B.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 PREFIX OF THE 'POSITION, 'LAST_BIT, AND 'FIRST_BIT
27
--     ATTRIBUTES CAN DENOTE A RECORD COMPONENT, AND THE ATTRIBUTES
28
--     RETURN APPROPRIATE VALUES WHEN A RECORD REPRESENTATION CLAUSE IS
29
--     NOT PRESENT.
30
 
31
-- HISTORY:
32
--     BCB 09/14/87  CREATED ORIGINAL TEST.
33
--     RJW 02/08/88  REVISED SO THAT TEST PASSES IF BOOLEAN'SIZE = 1.
34
--     RJW 05/31/90  CORRECTED COMPARISONS INVOLVING SIZES.
35
--     LDC 10/04/90  ADDED CHECK FOR 'POSITION.
36
 
37
WITH REPORT;  USE REPORT;
38
 
39
PROCEDURE CD7204B IS
40
 
41
     TYPE BASIC_REC IS RECORD
42
          CHECK_INT : INTEGER := 5;
43
          CHECK_BOOL : BOOLEAN := TRUE;
44
     END RECORD;
45
 
46
     CHECK_REC : BASIC_REC;
47
 
48
BEGIN
49
 
50
     TEST ("CD7204B", "CHECK THAT THE PREFIX OF THE 'POSITION, " &
51
                      "'LAST_BIT, AND 'FIRST_BIT ATTRIBUTES CAN " &
52
                      "DENOTE A RECORD COMPONENT, AND THE ATTRIBUTES " &
53
                      "RETURN APPROPRIATE VALUES WHEN A RECORD " &
54
                      "REPRESENTATION CLAUSE IS NOT PRESENT");
55
 
56
     IF CHECK_REC.CHECK_INT'FIRST_BIT >= CHECK_REC.CHECK_INT'LAST_BIT
57
          THEN FAILED ("INCORRECT VALUES FOR FIRST_BIT OR LAST_BIT " &
58
                       "OF CHECK_INT");
59
     END IF;
60
 
61
     IF (CHECK_REC.CHECK_INT'LAST_BIT - CHECK_REC.CHECK_INT'FIRST_BIT
62
          + 1) < INTEGER'SIZE THEN
63
          FAILED ("INCORRECT SIZE FOR CHECK_INT");
64
     END IF;
65
 
66
     IF CHECK_REC.CHECK_BOOL'POSITION <= CHECK_REC.CHECK_INT'POSITION
67
          THEN FAILED ("INCORRECT VALUE FOR 'POSITION OF CHECK_INT " &
68
                       "OR CHECK_BOOL");
69
     END IF;
70
 
71
     IF CHECK_REC.CHECK_INT'POSITION >= CHECK_REC.CHECK_BOOL'POSITION
72
          THEN FAILED ("INCORRECT VALUE FOR 'POSITION OF CHECK_INT " &
73
                       "OR CHECK_BOOL - 2");
74
     END IF;
75
 
76
     IF CHECK_REC.CHECK_BOOL'FIRST_BIT > CHECK_REC.CHECK_BOOL'LAST_BIT
77
          THEN FAILED ("INCORRECT VALUE FOR FIRST_BIT OR LAST_BIT " &
78
                       "OF CHECK_BOOL");
79
     END IF;
80
 
81
     IF (CHECK_REC.CHECK_BOOL'LAST_BIT - CHECK_REC.CHECK_BOOL'FIRST_BIT
82
          + 1) < BOOLEAN'SIZE THEN
83
          FAILED ("INCORRECT SIZE FOR CHECK_BOOL");
84
     END IF;
85
 
86
     RESULT;
87
 
88
END CD7204B;

powered by: WebSVN 2.1.0

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