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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C55B07A.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 LOOPS OVER RANGES OF TYPE LONG_INTEGER
27
--     CAN BE WRITTEN.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE TO IMPLEMENTATIONS WHICH SUPPORT
31
--     THE TYPE LONG_INTEGER.
32
--
33
--     IF THE TYPE LONG_INTEGER IS NOT SUPPORTED, THEN THE
34
--     DECLARATION OF CHECK MUST BE REJECTED.
35
 
36
-- HISTORY:
37
--     RM  07/06/82  CREATED ORIGINAL TEST.
38
--     BCB 01/04/88  MODIFIED HEADER.
39
 
40
 
41
WITH REPORT; USE REPORT;
42
 
43
PROCEDURE C55B07A IS
44
 
45
     CHECK : LONG_INTEGER;                             -- N/A => ERROR.
46
 
47
     TYPE  NEW_LONG_INTEGER  IS  NEW LONG_INTEGER ;
48
 
49
     THE_COUNT : INTEGER := 777 ;   -- JUST A DUMMY...
50
 
51
     LI_VAR   :           LONG_INTEGER      :=  1 ;
52
     LI_CON   :  CONSTANT LONG_INTEGER      :=  1 ;
53
 
54
     NLI_VAR  :           NEW_LONG_INTEGER  :=  1 ;
55
     NLI_CON  :  CONSTANT NEW_LONG_INTEGER  :=  1 ;
56
 
57
     SUBTYPE   LI_SEGMENT  IS  LONG_INTEGER RANGE
58
                               LONG_INTEGER'LAST..LONG_INTEGER'LAST ;
59
 
60
     SUBTYPE  NLI_SEGMENT  IS  NEW_LONG_INTEGER RANGE
61
                               NEW_LONG_INTEGER'FIRST..
62
                               NEW_LONG_INTEGER'FIRST ;
63
 
64
     COUNT : INTEGER := 0;
65
 
66
     PROCEDURE  BUMP ( DUMMY : INTEGER )  IS
67
     BEGIN
68
          COUNT := COUNT + 1;
69
     END  BUMP;
70
 
71
BEGIN
72
 
73
     TEST ( "C55B07A" , "LOOPS OVER RANGES OF TYPE  LONG_INTEGER " );
74
 
75
     FOR  I  IN  1..LI_CON  LOOP
76
          BUMP(THE_COUNT) ;
77
     END LOOP;
78
 
79
     FOR  I  IN  NLI_VAR..1  LOOP
80
          BUMP(THE_COUNT) ;
81
     END LOOP;
82
 
83
     FOR  I  IN  1..LONG_INTEGER(1)  LOOP
84
          BUMP(THE_COUNT) ;
85
     END LOOP;
86
 
87
     FOR  I  IN  1..NEW_LONG_INTEGER(1)  LOOP
88
          BUMP(THE_COUNT) ;
89
     END LOOP;
90
 
91
     FOR  I  IN  LI_SEGMENT  LOOP
92
          BUMP(THE_COUNT) ;
93
     END LOOP;
94
 
95
     FOR  I  IN  REVERSE NLI_SEGMENT  LOOP
96
          BUMP(THE_COUNT) ;
97
     END LOOP;
98
 
99
     FOR  I  IN  LONG_INTEGER RANGE 1..1  LOOP
100
          BUMP(THE_COUNT) ;
101
     END LOOP;
102
 
103
     FOR  I  IN  NEW_LONG_INTEGER RANGE 1..1  LOOP
104
          BUMP(THE_COUNT) ;
105
     END LOOP;
106
 
107
     FOR  I  IN  LONG_INTEGER LOOP
108
          BUMP(THE_COUNT) ;
109
          EXIT WHEN  I = LONG_INTEGER'FIRST + 1;
110
     END LOOP;
111
 
112
     FOR  I  IN  NEW_LONG_INTEGER LOOP
113
          BUMP(THE_COUNT) ;
114
          EXIT WHEN  I = NEW_LONG_INTEGER'FIRST + 1;
115
     END LOOP;
116
 
117
 
118
     IF  COUNT /= 12  THEN
119
          FAILED ("WRONG LOOP COUNT");
120
     END IF;
121
 
122
 
123
     RESULT;
124
 
125
 
126
END  C55B07A ;

powered by: WebSVN 2.1.0

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