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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C45411B.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 UNARY "+" AND "-" YIELD CORRECT RESULTS FOR
27
--     PREDEFINED SHORT_INTEGER OPERANDS.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS THAT SUPPORT
31
--     THE PREDEFINED SHORT_INTEGER TYPE.
32
 
33
--     IF THE TYPE SHORT_INTEGER IS NOT SUPPORTED, THEN THE DECLARATION
34
--     OF TYPE "DT" MUST BE REJECTED.
35
 
36
-- HISTORY:
37
--     JET 07/11/88  CREATED ORIGINAL TEST.
38
--     KAS 01/12/95  DELETED INCOMPATIBLE SUBTEST.
39
 
40
WITH REPORT; USE REPORT;
41
 
42
PROCEDURE C45411B IS
43
 
44
     TYPE DT IS NEW SHORT_INTEGER RANGE -3..3;          -- N/A => ERROR.
45
     I1 : SHORT_INTEGER := 1;
46
     D1 : DT := 1;
47
 
48
     FUNCTION IDENT (A : SHORT_INTEGER) RETURN SHORT_INTEGER IS
49
     BEGIN
50
          RETURN A * SHORT_INTEGER(IDENT_INT(1));
51
     END;
52
 
53
BEGIN
54
     TEST ("C45411B", "CHECK THAT UNARY ""+"" AND ""-"" YIELD " &
55
                      "CORRECT RESULTS FOR PREDEFINED SHORT_INTEGER " &
56
                      "OPERANDS");
57
 
58
     FOR I IN (1-2)..SHORT_INTEGER(1) LOOP
59
          IF "-"(RIGHT => I1) /= IDENT(I) THEN
60
               FAILED ("INCORRECT RESULT FOR ""-"" -" &
61
                       SHORT_INTEGER'IMAGE(I+2));
62
          END IF;
63
 
64
          IF +I1 /= IDENT(I1) THEN
65
               FAILED ("INCORRECT RESULT FOR ""+"" -" &
66
                       SHORT_INTEGER'IMAGE(I+2));
67
          END IF;
68
          I1 := I1 - 1;
69
     END LOOP;
70
 
71
     FOR I IN (1-2)..SHORT_INTEGER(1) LOOP
72
          IF -I /= IDENT(0)-I THEN
73
               FAILED ("INCORRECT RESULT FOR ""-"" -" &
74
                       SHORT_INTEGER'IMAGE(I+5));
75
          END IF;
76
 
77
          IF "+"(RIGHT => IDENT(I)) /= I THEN
78
               FAILED ("INCORRECT RESULT FOR ""+"" -" &
79
                       SHORT_INTEGER'IMAGE(I+5));
80
          END IF;
81
     END LOOP;
82
 
83
     IF -1 /= IDENT(1)-2 THEN
84
          FAILED ("INCORRECT RESULT FOR ""-"" - 7");
85
     END IF;
86
 
87
     IF "-"(RIGHT => 0) /= IDENT(0) THEN
88
          FAILED ("INCORRECT RESULT FOR ""-"" - 8");
89
     END IF;
90
 
91
     IF "-"(RIGHT => "-"(RIGHT => 1)) /= IDENT(1) THEN
92
          FAILED ("INCORRECT RESULT FOR ""-"" - 9");
93
     END IF;
94
 
95
     IF "+"(RIGHT => 1) /= IDENT(2)-1 THEN
96
          FAILED ("INCORRECT RESULT FOR ""+"" - 7");
97
     END IF;
98
 
99
     IF +0 /= IDENT(0) THEN
100
          FAILED ("INCORRECT RESULT FOR ""+"" - 8");
101
     END IF;
102
 
103
     IF +(-1) /= IDENT(1)-2 THEN
104
          FAILED ("INCORRECT RESULT FOR ""+"" - 9");
105
     END IF;
106
 
107
     FOR I IN (1-2)..SHORT_INTEGER(1) LOOP
108
          IF "-"(RIGHT => D1) /= DT(IDENT(I)) THEN
109
               FAILED ("INCORRECT RESULT FOR ""-"" -" &
110
                       SHORT_INTEGER'IMAGE(I+11));
111
          END IF;
112
 
113
          IF +D1 /= DT(IDENT(SHORT_INTEGER(D1))) THEN
114
               FAILED ("INCORRECT RESULT FOR ""+"" -" &
115
                       SHORT_INTEGER'IMAGE(I+11));
116
          END IF;
117
          D1 := D1 - 1;
118
     END LOOP;
119
 
120
 
121
     RESULT;
122
 
123
END C45411B;

powered by: WebSVN 2.1.0

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