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

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

Line No. Rev Author Line
1 294 jeremybenn
-- CD4041A.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 AN ALIGNMENT CLAUSE CAN BE GIVEN FOR A RECORD
27
--     REPRESENTATION CLAUSE.
28
 
29
-- HISTORY:
30
--     RJW 08/25/87  CREATED ORIGINAL TEST.
31
--     DHH 03/30/89  CHANGED MOD 4 TO A MACRO VALUE AND CHANGED
32
--                   EXTENSION FROM '.DEP' TO '.TST'.
33
 
34
-- MACRO SUBSTITUTION:
35
--     $ALIGNMENT IS THE VALUE USED TO ALIGN A RECORD ON A BOUNDARY
36
--     DEFINED BY THE IMPLEMENTATION.
37
 
38
WITH REPORT; USE REPORT;
39
WITH SYSTEM;
40
PROCEDURE CD4041A IS
41
 
42
     UNITS_PER_INTEGER : CONSTANT :=
43
                      (INTEGER'SIZE + SYSTEM.STORAGE_UNIT - 1) /
44
                      SYSTEM.STORAGE_UNIT;
45
 
46
     TYPE CHECK_CLAUSE IS RECORD
47
          INT_COMP    : INTEGER;
48
          CHAR_COMP   : CHARACTER;
49
     END RECORD;
50
 
51
     FOR CHECK_CLAUSE USE
52
          RECORD AT MOD $ALIGNMENT;
53
               INT_COMP AT 0
54
                           RANGE 0..INTEGER'SIZE - 1;
55
               CHAR_COMP AT 1*UNITS_PER_INTEGER
56
                           RANGE 0..CHARACTER'SIZE - 1;
57
          END RECORD;
58
 
59
     CHECK_RECORD : CHECK_CLAUSE := (1, 'A');
60
 
61
BEGIN
62
     TEST ("CD4041A", "CHECK THAT AN ALIGNMENT CLAUSE CAN BE " &
63
                      "GIVEN FOR A RECORD REPRESENTATION CLAUSE");
64
 
65
     IF CHECK_RECORD.INT_COMP'FIRST_BIT /= 0 THEN
66
          FAILED ("INCORRECT VALUE FOR FIRST_BIT OF INT_COMP");
67
     END IF;
68
 
69
     IF CHECK_RECORD.INT_COMP'LAST_BIT /= INTEGER'SIZE - 1 THEN
70
          FAILED ("INCORRECT VALUE FOR LAST_BIT OF INT_COMP");
71
     END IF;
72
 
73
     IF CHECK_RECORD.INT_COMP'POSITION /= 0 THEN
74
          FAILED ("INCORRECT VALUE FOR POSITION OF INT_COMP");
75
     END IF;
76
 
77
     IF CHECK_RECORD.CHAR_COMP'FIRST_BIT /= IDENT_INT (0) THEN
78
          FAILED ("INCORRECT VALUE FOR FIRST_BIT OF CHAR_COMP");
79
     END IF;
80
 
81
     IF CHECK_RECORD.CHAR_COMP'LAST_BIT /=
82
               IDENT_INT (CHARACTER'SIZE - 1) THEN
83
          FAILED ("INCORRECT VALUE FOR LAST_BIT OF CHAR_COMP");
84
     END IF;
85
 
86
     IF CHECK_RECORD.CHAR_COMP'POSITION /=
87
               IDENT_INT (UNITS_PER_INTEGER) THEN
88
          FAILED ("INCORRECT VALUE FOR POSITION OF CHAR_COMP");
89
     END IF;
90
 
91
     RESULT;
92
END CD4041A;

powered by: WebSVN 2.1.0

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