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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C52103L.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 ELSEWHERE.)
31
 
32
-- THIS IS THE SECOND FILE IN
33
--    DIVISION  C :  NON-NULL ARRAYS WHOSE LENGTHS ARE NOT DETERMINABLE
34
--                   STATICALLY.
35
 
36
 
37
 
38
-- RM 07/20/81
39
-- SPS 3/22/83
40
 
41
 
42
WITH REPORT;
43
PROCEDURE  C52103L  IS
44
 
45
     USE  REPORT ;
46
 
47
BEGIN
48
 
49
     TEST( "C52103L" , "CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE" &
50
                       " ASSIGNMENTS  THE LENGTHS MUST MATCH" );
51
 
52
 
53
     --                              ( EACH DIVISION COMPRISES 3 FILES,
54
     --                                COVERING RESPECTIVELY THE FIRST
55
     --                                3 , NEXT 2 , AND LAST 3 OF THE 8
56
     --                                SELECTIONS FOR THE DIVISION.)
57
 
58
 
59
     -------------------------------------------------------------------
60
 
61
     --   (13) UNSLICED ONE-DIMENSIONAL ARRAY OBJECTS WHOSE TYPEMARKS
62
     --        WERE DEFINED USING THE "BOX" SYMBOL
63
     --        AND FOR WHICH THE COMPONENT TYPE IS  'CHARACTER' .
64
 
65
     DECLARE
66
 
67
          TYPE  TABOX3  IS  ARRAY( INTEGER RANGE <> )  OF CHARACTER ;
68
 
69
          ARRX31  :  TABOX3( IDENT_INT(11)..IDENT_INT(15) );
70
 
71
     BEGIN
72
 
73
 
74
          -- ARRAY ASSIGNMENT (WITH STRING AGGREGATE):
75
 
76
          ARRX31 :=  "QUINC" ; -- "QUINC"(1..5)  SLIDES TO 11..15
77
 
78
 
79
          -- CHECKING THE VALUES AFTER THE ASSIGNMENT:
80
 
81
          IF  ARRX31                                 /=  "QUINC"  OR
82
              ARRX31( IDENT_INT(11)..IDENT_INT(15) ) /=  "QUINC"
83
          THEN
84
               FAILED( "ARRAY ASSIGNMENT NOT CORRECT (13)" );
85
          END IF;
86
 
87
     EXCEPTION
88
 
89
          WHEN  OTHERS  =>
90
               FAILED( "EXCEPTION RAISED  -  SUBTEST 13" );
91
 
92
     END ;
93
 
94
 
95
     -------------------------------------------------------------------
96
 
97
     --    (6) SLICED ONE-DIMENSIONAL ARRAY OBJECTS WHOSE TYPEMARKS
98
     --        WERE DEFINED WITHOUT EVER USING THE "BOX" SYMBOL
99
     --        AND FOR WHICH THE COMPONENT TYPE IS  'CHARACTER' .
100
     --
101
 
102
     DECLARE
103
 
104
          TYPE  TA61  IS  ARRAY(
105
               INTEGER RANGE IDENT_INT(11)..IDENT_INT(15)
106
                               )  OF CHARACTER ;
107
 
108
          ARR61  :  TA61 ;
109
 
110
     BEGIN
111
 
112
          -- INITIALIZATION OF UNUSED COMPONENT OF LHS ARRAY:
113
 
114
          ARR61( IDENT_INT(11)..IDENT_INT(11) )  :=  "Q"  ;
115
 
116
 
117
          -- SLICE ASSIGNMENT:
118
 
119
          ARR61( IDENT_INT(12)..IDENT_INT(15) ) :=  "UINC" ;
120
                                   -- "UINC"(1..4)  SLIDES TO 12..15
121
 
122
 
123
          -- CHECKING THE VALUES AFTER THE SLICE ASSIGNMENT:
124
 
125
          IF  ARR61                                 /=  "QUINC"  OR
126
              ARR61( IDENT_INT(11)..IDENT_INT(15) ) /=  "QUINC"
127
          THEN
128
               FAILED( "SLICE ASSIGNMENT NOT CORRECT (6)" );
129
          END IF;
130
 
131
     EXCEPTION
132
 
133
          WHEN  OTHERS  =>
134
               FAILED( "EXCEPTION RAISED  -  SUBTEST 6" );
135
 
136
     END ;
137
 
138
 
139
     -------------------------------------------------------------------
140
 
141
 
142
     RESULT ;
143
 
144
 
145
END  C52103L ;

powered by: WebSVN 2.1.0

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