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/] [c4/] [c45613b.dep] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C45613B.DEP
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 CONSTRAINT_ERROR IS RAISED
27
--     BY "**" FOR SHORT_INTEGER WHEN THE RESULT EXCEEDS THE RANGE
28
--     OF THE BASE TYPE.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE TO THOSE IMPLEMENTATIONS WHICH SUPPORT
32
--     SHORT_INTEGER.
33
 
34
--     IF "SHORT_INTEGER" IS NOT SUPPORTED, THEN THE DECLARATION OF
35
--     "CHECK_SHORT" MUST BE REJECTED.
36
 
37
-- *** NOTE: This test has been modified since ACVC version 1.11 to    -- 9X
38
-- ***       remove incompatibilities associated with the transition   -- 9X
39
-- ***       to Ada 9X.                                                -- 9X
40
-- ***                                                                 -- 9X
41
 
42
-- HISTORY:
43
--     HTG 10/06/86 CREATED ORIGINAL TEST.
44
--     DHH 01/13/88 ADDED APPLICABILITY CRITERIA AND STANDARD HEADER.
45
--     MRM 03/30/93 REMOVED NUMERIC_ERROR FOR 9X COMPATIBILITY
46
 
47
WITH REPORT; USE REPORT;
48
PROCEDURE C45613B IS
49
 
50
    CHECK_SHORT : SHORT_INTEGER;                   -- N/A => ERROR.
51
 
52
    FUNCTION IDENT (X : SHORT_INTEGER) RETURN SHORT_INTEGER IS
53
    BEGIN
54
         RETURN SHORT_INTEGER (IDENT_INT (INTEGER (X)));
55
    END IDENT;
56
 
57
BEGIN
58
     TEST ("C45613B","CHECK THAT CONSTRAINT_ERROR " &
59
                     "IS RAISED BY ""**"" FOR SHORT_INTEGER WHEN " &
60
                     "THE RESULT EXCEEDS THE RANGE OF THE BASE TYPE");
61
 
62
     DECLARE
63
          INT : SHORT_INTEGER;
64
     BEGIN
65
          INT := IDENT(SHORT_INTEGER'LAST ** IDENT_INT(2));
66
                 FAILED ("NO EXCEPTION FOR SECOND POWER OF " &
67
                         "SHORT_INTEGER'LAST");
68
 
69
          EXCEPTION
70
               WHEN CONSTRAINT_ERROR =>
71
                    NULL;
72
               WHEN OTHERS =>
73
                    FAILED ("WRONG EXCEPTION RAISED FOR " &
74
                            "SECOND POWER OF " &
75
                            "SHORT_INTEGER'LAST");
76
     END;
77
 
78
     DECLARE
79
          INT : SHORT_INTEGER;
80
     BEGIN
81
          INT := IDENT(SHORT_INTEGER'FIRST ** IDENT_INT(3));
82
          FAILED ("NO EXCEPTION FOR THIRD POWER OF " &
83
                  "SHORT_INTEGER'FIRST");
84
 
85
          EXCEPTION
86
               WHEN CONSTRAINT_ERROR =>
87
                    NULL;
88
               WHEN OTHERS =>
89
                    FAILED ("WRONG EXCEPTION RAISED FOR " &
90
                            "THIRD POWER OF " &
91
                            "SHORT_INTEGER'FIRST");
92
 
93
     END;
94
 
95
     RESULT;
96
 
97
END C45613B;

powered by: WebSVN 2.1.0

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