OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c46011a.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C46011A.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
-- CHECK THAT INTEGER CONVERSIONS ARE PERFORMED CORRECTLY WHEN THE 
26
-- TARGET AND OPERAND TYPES ARE BOTH INTEGER TYPES.
27
 
28
-- R.WILLIAMS 9/8/86
29
 
30
WITH REPORT; USE REPORT;
31
PROCEDURE C46011A IS
32
 
33
     TYPE INT1 IS RANGE -100 .. 100;
34
     I1 : INT1 := INT1'VAL (IDENT_INT (10));
35
     F1 : INT1 := INT1'VAL (IDENT_INT (-100));
36
     L1 : INT1 := INT1'VAL (IDENT_INT (100));
37
 
38
     TYPE INT2 IS RANGE -100 .. 100;
39
     I2 : INT2 := INT2'VAL (IDENT_INT (10));
40
     F2 : INT2 := INT2'VAL (IDENT_INT (-100));
41
     L2 : INT2 := INT2'VAL (IDENT_INT (100));
42
 
43
 
44
     TYPE NEWINTEGER IS NEW INTEGER;
45
     N1 : NEWINTEGER :=
46
          NEWINTEGER'VAL (IDENT_INT (10));
47
 
48
     T1 : INTEGER := IDENT_INT (10);
49
 
50
     U1 : CONSTANT := INTEGER'POS (10);
51
BEGIN
52
     TEST ( "C46011A", "CHECK THAT INTEGER CONVERSIONS ARE " &
53
                       "PERFORMED CORRECTLY WHEN THE TARGET AND " &
54
                       "OPERAND TYPES ARE BOTH INTEGER TYPES" );
55
 
56
     IF INT1 (U1) /= U1 THEN
57
          FAILED ( "INCORRECT CONVERSION OF 'INT1 (U1)'" );
58
     END IF;
59
 
60
     IF INT1 (I1) /= I1 THEN
61
          FAILED ( "INCORRECT CONVERSION OF 'INT1 (I1)'" );
62
     END IF;
63
 
64
     IF INT1 (N1) /= I1 THEN
65
          FAILED ( "INCORRECT CONVERSION OF 'INT1 (N1)'" );
66
     END IF;
67
 
68
     IF INT1 (10) /= I1 THEN
69
          FAILED ( "INCORRECT CONVERSION OF 'INT1 (10)'" );
70
     END IF;
71
 
72
     IF INT1 (T1) /= I1 THEN
73
          FAILED ( "INCORRECT CONVERSION OF 'INT1 (T1)'" );
74
     END IF;
75
 
76
     IF INT1 (F2) /= F1 THEN
77
          FAILED ( "INCORRECT CONVERSION OF 'INT1 (F2)'" );
78
     END IF;
79
 
80
     IF INT1 (L2) /= L1 THEN
81
          FAILED ( "INCORRECT CONVERSION OF 'INT1 (L2)'" );
82
     END IF;
83
 
84
     IF INT2 (I1) /= I2 THEN
85
          FAILED ( "INCORRECT CONVERSION OF 'INT2 (I1)'" );
86
     END IF;
87
 
88
     IF INT2 (T1) /= 10 THEN
89
          FAILED ( "INCORRECT CONVERSION OF 'INT2 (T1)'" );
90
     END IF;
91
 
92
     IF INT2 (F1) /= -100 THEN
93
          FAILED ( "INCORRECT CONVERSION OF 'INT2 (F1)'" );
94
     END IF;
95
 
96
     IF INT2 (L1) /= 100 THEN
97
          FAILED ( "INCORRECT CONVERSION OF 'INT2 (L1)'" );
98
     END IF;
99
 
100
     IF NEWINTEGER (I1) /= N1 THEN
101
          FAILED ( "INCORRECT CONVERSION OF 'NEWINTEGER (I1)'" );
102
     END IF;
103
 
104
     IF NEWINTEGER (N1) /= N1 THEN
105
          FAILED ( "INCORRECT CONVERSION OF 'NEWINTEGER (N1)'" );
106
     END IF;
107
 
108
     IF NEWINTEGER (T1) /= N1 THEN
109
          FAILED ( "INCORRECT CONVERSION OF 'NEWINTEGER (T1)'" );
110
     END IF;
111
 
112
     IF NEWINTEGER (INTEGER (N1)) /= N1 THEN
113
          FAILED ( "INCORRECT CONVERSION OF " &
114
                   "'NEWINTEGER (INTEGER (N1))'" );
115
     END IF;
116
 
117
     IF NEWINTEGER (INTEGER (N1 + 1)) /= 11 THEN
118
          FAILED ( "INCORRECT CONVERSION OF " &
119
                   "'NEWINTEGER (INTEGER (N1 + 1))'" );
120
     END IF;
121
 
122
     IF INTEGER (10) /= T1 THEN
123
          FAILED ( "INCORRECT CONVERSION OF 'INTEGER (10)'" );
124
     END IF;
125
 
126
     IF INTEGER (N1) /= 10 THEN
127
          FAILED ( "INCORRECT CONVERSION OF 'INTEGER (N1)'" );
128
     END IF;
129
 
130
     IF INTEGER (I1) /= T1 THEN
131
          FAILED ( "INCORRECT CONVERSION OF 'INTEGER (I1)'" );
132
     END IF;
133
 
134
     IF INTEGER (INT1 (NEWINTEGER (INT1 (I1)))) /= T1 THEN
135
          FAILED ( "INCORRECT CONVERSION OF " &
136
                   "'INTEGER (INT1 (NEWINTEGER (INT1 (I1)))'" );
137
     END IF;
138
 
139
 
140
     IF INTEGER (I1 + 1) /= 11 THEN
141
          FAILED ( "INCORRECT CONVERSION OF 'INTEGER (I1 + 1)'" );
142
     END IF;
143
 
144
     RESULT;
145
END C46011A;

powered by: WebSVN 2.1.0

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