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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
--  C45611B.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 EXPONENTIATION OF A SHORT_INTEGER TO AN INTEGER VALUE
27
--     IS CORRECTLY EVALUATED.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE TO THOSE IMPLEMENTATIONS WHICH SUPPORT
31
--     SHORT_INTEGER.
32
 
33
--     IF "SHORT_INTEGER" IS NOT SUPPORTED, THEN THE DECLARATION OF
34
--     "CHECK_SHORT" MUST BE REJECTED.
35
 
36
-- HISTORY:
37
--     HTG 09/23/86 CREATED ORIGINAL TEST.
38
--     DHH 01/13/88 ADDED APPLICABILITY CRITERIA AND STANDARD HEADER.
39
 
40
WITH REPORT; USE REPORT;
41
 
42
PROCEDURE C45611B IS
43
 
44
    CHECK_SHORT : SHORT_INTEGER;                   -- N/A => ERROR.
45
 
46
    I1,INT : SHORT_INTEGER;
47
 
48
    FUNCTION IDENT (X : SHORT_INTEGER) RETURN SHORT_INTEGER IS
49
    BEGIN
50
         RETURN SHORT_INTEGER (IDENT_INT (INTEGER (X)));
51
    END IDENT;
52
 
53
    BEGIN
54
 
55
 
56
         TEST ("C45611B", "CHECK THAT EXPONENTIATION OF A " &
57
                          "SHORT_INTEGER VALUE IS CORRECTLY " &
58
                          "EVALUATED");
59
 
60
         I1 := IDENT(0) ** IDENT_INT(0);
61
 
62
         IF IDENT(I1) /= IDENT(1) THEN
63
              FAILED( "INCORRECT RESULT FOR '0**0'" );
64
         END IF;
65
 
66
         INT := "**" (IDENT(0),IDENT_INT(1));
67
 
68
         IF IDENT(INT) /= IDENT(0) THEN
69
              FAILED( "INCORRECT RESULT FOR '0**1'" );
70
         END IF;
71
 
72
         I1 := IDENT(6) ** IDENT_INT(0);
73
 
74
         IF IDENT(I1) /= IDENT(1) THEN
75
              FAILED( "INCORRECT RESULT FOR '6**0'" );
76
         END IF;
77
 
78
         INT := IDENT(15) ** IDENT_INT(1);
79
 
80
         IF IDENT(INT) /= IDENT(15) THEN
81
              FAILED( "INCORRECT RESULT FOR '15**1'" );
82
         END IF;
83
 
84
         I1 := IDENT(-3) ** IDENT_INT(0);
85
 
86
         IF IDENT(I1) /= IDENT(1) THEN
87
              FAILED( "INCORRECT RESULT FOR '(-3)**0'" );
88
         END IF;
89
 
90
         INT := "**" (IDENT(-7),IDENT_INT(1));
91
 
92
         IF IDENT(INT) /= IDENT(-7) THEN
93
              FAILED( "INCORRECT RESULT FOR '(-7)**1'" );
94
         END IF;
95
 
96
         I1 := "**" (IDENT(-1),IDENT_INT(2));
97
 
98
         IF IDENT(I1) /= IDENT(1) THEN
99
              FAILED( "INCORRECT RESULT FOR '(-1)**2'" );
100
         END IF;
101
 
102
 
103
         INT := IDENT(-1) ** IDENT_INT(3);
104
 
105
         IF IDENT(INT) /= IDENT(-1) THEN
106
              FAILED( "INCORRECT RESULT FOR '(-1)**3'" );
107
         END IF;
108
 
109
         INT := "**" (IDENT(0),IDENT_INT(2));
110
 
111
         IF IDENT(INT) /= IDENT(0) THEN
112
              FAILED( "INCORRECT RESULT FOR '0**2'" );
113
         END IF;
114
 
115
         INT := IDENT(0) ** IDENT_INT(10);
116
 
117
         IF IDENT(INT) /= IDENT(0) THEN
118
              FAILED( "INCORRECT RESULT FOR '0**10'" );
119
         END IF;
120
 
121
         INT := "**" (IDENT(6),IDENT_INT(2));
122
 
123
         IF IDENT(INT) /= IDENT(36) THEN
124
              FAILED( "INCORRECT RESULT FOR '6**2'" );
125
         END IF;
126
 
127
         INT := "**" (IDENT(2),IDENT_INT(2));
128
 
129
         IF IDENT(INT) /= IDENT(4) THEN
130
              FAILED( "INCORRECT RESULT FOR '2**2'" );
131
         END IF;
132
 
133
         I1 := "**" (IDENT(1),IDENT_INT(10));
134
 
135
         IF IDENT(I1) /= IDENT(1) THEN
136
              FAILED( "INCORRECT RESULT FOR '1**10'" );
137
         END IF;
138
 
139
         RESULT;
140
 
141
    END C45611B;

powered by: WebSVN 2.1.0

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