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/] [c3/] [c37217b.ada] - Blame information for rev 316

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

Line No. Rev Author Line
1 294 jeremybenn
-- C37217B.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 WHETHER THE OPTIONAL COMPATIBILITY CHECK IS
27
--     PERFORMED WHEN A DISCRIMINANT CONSTRAINT IS GIVEN FOR AN ACCESS
28
--     TYPE - BEFORE THE DESIGNATED TYPE'S FULL DECLARATION.
29
 
30
-- HISTORY:
31
--     DHH 08/04/88 CREATED ORIGINAL TEST.
32
 
33
WITH REPORT; USE REPORT;
34
PROCEDURE C37217B IS
35
 
36
     SUBTYPE SM IS INTEGER RANGE 1..10;
37
 
38
BEGIN  --C37217B BODY
39
     TEST ("C37217B", "CHECK WHETHER THE OPTIONAL COMPATIBILITY " &
40
                      "CHECK IS PERFORMED WHEN A DISCRIMINANT " &
41
                      "CONSTRAINT IS GIVEN FOR AN ACCESS TYPE - " &
42
                      "BEFORE THE DESIGNATED TYPE'S FULL DECLARATION");
43
 
44
---------------------------------------------------------------------
45
                                             -- INCOMPLETE DECLARATION
46
                                             -- UPPER LIMIT
47
     BEGIN  -- F
48
          DECLARE  -- F
49
               TYPE REC(D1 : INTEGER);
50
 
51
               TYPE PTR IS ACCESS REC;
52
               X : PTR(IDENT_INT(11));
53
 
54
               TYPE SM_REC(D : SM) IS
55
                    RECORD
56
                         NULL;
57
                    END RECORD;
58
 
59
               TYPE REC(D1 : INTEGER) IS
60
                    RECORD
61
                         INT : SM_REC(D1);
62
                    END RECORD;
63
          BEGIN
64
               COMMENT("OPTIONAL COMPATIBILITY CHECK NOT PERFORMED " &
65
                       "- UPPER");
66
               X := NEW REC(IDENT_INT(11));
67
               FAILED("CONSTRAINT ERROR NOT RAISED - UPPER");
68
 
69
               IF IDENT_INT(X.INT.D) /= IDENT_INT(1) THEN
70
                    COMMENT("IRREVELANT");
71
               END IF;
72
          EXCEPTION
73
               WHEN CONSTRAINT_ERROR =>
74
                    NULL;
75
               WHEN OTHERS =>
76
                    FAILED("UNEXPECTED EXCEPTION RAISED IN " &
77
                           "VARIABLE USE - INCOMPLETE UPPER");
78
          END;
79
     EXCEPTION
80
          WHEN CONSTRAINT_ERROR =>
81
               COMMENT("OPTIONAL COMPATIBILITY CHECK PERFORMED " &
82
                       "- INCOMPLETE UPPER");
83
          WHEN OTHERS =>
84
               FAILED("UNEXPECTED EXCEPTION RAISED IN " &
85
                      "VARIABLE DECLARATION - INCOMPLETE UPPER");
86
     END;  -- F
87
 
88
-----------------------------------------------------------------------
89
                                              -- INCOMPLETE DECLARATION
90
                                              -- LOWER LIMIT
91
     BEGIN  -- A
92
          DECLARE  -- A
93
               TYPE REC(D1 : INTEGER);
94
 
95
               TYPE PTR IS ACCESS REC;
96
               X : PTR(IDENT_INT(0));
97
 
98
               TYPE SM_ARR IS ARRAY(SM RANGE <>) OF INTEGER;
99
 
100
               TYPE REC(D1 : INTEGER) IS
101
                    RECORD
102
                         INT : SM_ARR(D1 .. 2);
103
                    END RECORD;
104
          BEGIN
105
               COMMENT("OPTIONAL COMPATIBILITY CHECK NOT PERFORMED " &
106
                       "- LOWER");
107
               X := NEW REC'(IDENT_INT(0), INT =>
108
                                             (OTHERS => IDENT_INT(1)));
109
               FAILED("CONSTRAINT ERROR NOT RAISED - LOWER");
110
 
111
               IF X.INT(IDENT_INT(1)) /= IDENT_INT(1) THEN
112
                    COMMENT("IRREVELANT");
113
               END IF;
114
          EXCEPTION
115
               WHEN CONSTRAINT_ERROR =>
116
                    NULL;
117
               WHEN OTHERS =>
118
                    FAILED("UNEXPECTED EXCEPTION RAISED IN " &
119
                           "VARIABLE USE - INCOMPLETE LOWER");
120
          END;
121
     EXCEPTION
122
          WHEN CONSTRAINT_ERROR =>
123
               COMMENT("OPTIONAL COMPATIBILITY CHECK PERFORMED " &
124
                       "- INCOMPLETE LOWER");
125
          WHEN OTHERS =>
126
               FAILED("UNEXPECTED EXCEPTION RAISED IN " &
127
                      "VARIABLE DECLARATION - INCOMPLETE LOWER");
128
     END;
129
-----------------------------------------------------------------------
130
     RESULT;
131
 
132
END C37217B;  -- BODY

powered by: WebSVN 2.1.0

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