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/] [c5/] [c52103r.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C52103R.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 LENGTHS MUST MATCH IN ARRAY AND SLICE ASSIGNMENTS.
26
--    MORE SPECIFICALLY, TEST THAT ARRAY ASSIGNMENTS WITH MATCHING
27
--    LENGTHS DO NOT CAUSE  CONSTRAINT_ERROR  TO BE RAISED AND
28
--    ARE PERFORMED CORRECTLY.
29
--    (OVERLAPS BETWEEN THE OPERANDS OF THE ASSIGNMENT STATEMENT
30
--    ARE TREATED ELSWEWHERE.)
31
 
32
-- THIS IS THE THIRD FILE IN
33
--    DIVISION  D : NULL LENGTHS NOT DETERMINABLE STATICALLY.
34
 
35
 
36
-- RM 07/20/81
37
-- SPS 2/18/83
38
 
39
WITH REPORT;
40
PROCEDURE  C52103R  IS
41
 
42
     USE  REPORT ;
43
 
44
BEGIN
45
 
46
     TEST( "C52103R" , "CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE" &
47
                       " ASSIGNMENTS  THE LENGTHS MUST MATCH" );
48
 
49
 
50
     --                              ( EACH DIVISION COMPRISES 3 FILES,
51
     --                                COVERING RESPECTIVELY THE FIRST
52
     --                                3 , NEXT 2 , AND LAST 3 OF THE 8
53
     --                                SELECTIONS FOR THE DIVISION.)
54
 
55
 
56
     -------------------------------------------------------------------
57
 
58
     --    (7) UNSLICED OBJECTS OF THE PREDEFINED TYPE  'STRING'  (BY
59
     --        THEMSELVES).
60
 
61
     DECLARE
62
 
63
          ARR71  :  STRING( IDENT_INT(1)..IDENT_INT(0) )  := "" ;
64
          ARR72  :  STRING( IDENT_INT(5)..IDENT_INT(4) )  ;
65
 
66
     BEGIN
67
 
68
 
69
          -- STRING ASSIGNMENT:
70
 
71
          ARR72 := ARR71 ;
72
 
73
 
74
          -- CHECKING THE VALUES AFTER THE STRING ASSIGNMENT:
75
 
76
          IF  ARR72 /= ""
77
          THEN
78
               FAILED( "STRING ASSIGNMENT NOT CORRECT (7)" );
79
          END IF;
80
 
81
     EXCEPTION
82
 
83
          WHEN  OTHERS  =>
84
               FAILED( "EXCEPTION RAISED  -  SUBTEST 7" );
85
 
86
     END ;
87
 
88
 
89
     -------------------------------------------------------------------
90
 
91
     --    (8) SLICED OBJECTS OF THE PREDEFINED TYPE  'STRING' , WITH
92
     --        STRING LITERALS.
93
     --
94
 
95
     DECLARE
96
 
97
          ARR82 : STRING( IDENT_INT(5)..IDENT_INT(9) ) ;
98
 
99
     BEGIN
100
 
101
 
102
          -- INITIALIZATION OF LHS ARRAY:
103
 
104
          ARR82( IDENT_INT(5)..IDENT_INT(9) )  :=  "QUINC"  ;
105
 
106
 
107
          -- STRING LITERAL ASSIGNMENT:
108
 
109
          ARR82( IDENT_INT(5)..IDENT_INT(9) )
110
               ( IDENT_INT(6)..IDENT_INT(9) )
111
               ( IDENT_INT(6)..IDENT_INT(5) ) :=  "" ;
112
 
113
 
114
          -- CHECKING THE VALUES AFTER THE SLICE ASSIGNMENT:
115
 
116
          IF  ARR82                                 /=  "QUINC"  OR
117
              ARR82(  IDENT_INT(5)..IDENT_INT(9)  ) /=  "QUINC"
118
          THEN
119
               FAILED( "SLICE ASSIGNMENT NOT CORRECT (8)" );
120
          END IF;
121
 
122
     EXCEPTION
123
 
124
          WHEN  OTHERS  =>
125
               FAILED( "EXCEPTION RAISED  -  SUBTEST 8" );
126
 
127
     END ;
128
 
129
     -------------------------------------------------------------------
130
 
131
     --    (9) SLICED OBJECTS OF THE PREDEFINED TYPE  'STRING'  (BY
132
     --        THEMSELVES).
133
     --
134
 
135
     DECLARE
136
 
137
          SUBTYPE  TA92  IS  STRING( IDENT_INT(5)..IDENT_INT(9) ) ;
138
 
139
          ARR91  :  STRING( IDENT_INT(1)..IDENT_INT(5) )  := "ABCDE" ;
140
          ARR92  :  TA92 ;
141
 
142
     BEGIN
143
 
144
 
145
          -- INITIALIZATION OF LHS ARRAY:
146
 
147
          ARR92( IDENT_INT(5)..IDENT_INT(9) )  :=  "QUINC"  ;
148
 
149
 
150
          -- STRING SLICE ASSIGNMENT:
151
 
152
          ARR92( IDENT_INT(5)..IDENT_INT(9) )
153
               ( IDENT_INT(6)..IDENT_INT(9) )
154
               ( IDENT_INT(8)..IDENT_INT(7) ) :=
155
               ARR91
156
               ( IDENT_INT(1)..IDENT_INT(5) )
157
               ( IDENT_INT(5)..IDENT_INT(4) ) ;
158
 
159
 
160
          -- CHECKING THE VALUES AFTER THE SLICE ASSIGNMENT:
161
 
162
          IF  ARR92                                 /=  "QUINC"  OR
163
              ARR92(  IDENT_INT(5)..IDENT_INT(9)  ) /=  "QUINC"
164
          THEN
165
               FAILED( "SLICE ASSIGNMENT NOT CORRECT (9)" );
166
          END IF;
167
 
168
     EXCEPTION
169
 
170
          WHEN  OTHERS  =>
171
               FAILED( "EXCEPTION RAISED  -  SUBTEST 9" );
172
 
173
     END ;
174
 
175
     -------------------------------------------------------------------
176
 
177
 
178
     RESULT ;
179
 
180
 
181
END C52103R;

powered by: WebSVN 2.1.0

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