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/] [c45632c.dep] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
-- C45632C.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 FOR PREDEFINED TYPE LONG_INTEGER,
27
--     CONSTRAINT_ERROR IS RAISED FOR ABS (LONG_INTEGER'FIRST)
28
--     IF -LONG_INTEGER'LAST > LONG_INTEGER'FIRST.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS THAT SUPPORT
32
--     THE USE OF "LONG_INTEGER" AS A PREDEFINED DATA TYPE.
33
 
34
--     IF SUCH A TYPE IS NOT SUPPORTED, THEN THE DECLARATION OF THE
35
--     VARIABLE "TEST_VAR" 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
--     RJW 02/20/86  CREATED ORIGINAL TEST.
44
--     JET 12/30/87  UPDATED HEADER FORMAT, ADDED CODE TO DEFEAT
45
--                   OPTIMIZATION.
46
--     MRM 03/30/93  REMOVED NUMERIC ERROR FOR 9X COMPATIBILITY
47
 
48
WITH REPORT; USE REPORT;
49
 
50
PROCEDURE C45632C IS
51
 
52
     TEST_VAR : LONG_INTEGER;                  -- N/A => ERROR.
53
 
54
     FUNCTION IDENT_LONG (A : LONG_INTEGER) RETURN LONG_INTEGER IS
55
     BEGIN
56
          IF EQUAL (3,3) THEN
57
               RETURN A;
58
          ELSE
59
               RETURN 0;
60
          END IF;
61
     END IDENT_LONG;
62
 
63
BEGIN
64
 
65
     TEST ( "C45632C", "CHECK THAT FOR PREDEFINED TYPE " &
66
                       "LONG_INTEGER CONSTRAINT_ERROR IS RAISED FOR " &
67
                       "ABS (LONG_INTEGER'FIRST) IF " &
68
                       "-LONG_INTEGER'LAST > LONG_INTEGER'FIRST" );
69
 
70
     BEGIN
71
          IF - LONG_INTEGER'LAST > LONG_INTEGER'FIRST THEN
72
               DECLARE
73
                    I : LONG_INTEGER := IDENT_LONG(LONG_INTEGER'FIRST);
74
               BEGIN
75
                    IF IDENT_LONG(ABS I) = IDENT_LONG(I) THEN
76
                         FAILED ("NO EXCEPTION -- EQUALITY TRUE");
77
                    ELSE
78
                         FAILED ("NO EXCEPTION -- EQUALITY FALSE");
79
                    END IF;
80
               EXCEPTION
81
                    WHEN CONSTRAINT_ERROR =>
82
                         COMMENT ( "CONSTRAINT_ERROR RAISED" );
83
                    WHEN OTHERS =>
84
                         FAILED ( "WRONG EXCEPTION RAISED" );
85
               END;
86
          ELSE
87
               COMMENT ( "-LONG_INTEGER'LAST <= " &
88
                         "LONG_INTEGER'FIRST" );
89
          END IF;
90
     END;
91
 
92
     RESULT;
93
 
94
END C45632C;

powered by: WebSVN 2.1.0

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