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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c9/] [c95074c.ada] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
-- C95074C.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 'FIRST, 'LAST, 'LENGTH, AND 'RANGE, CAN BE APPLIED TO AN
26
-- OUT PARAMETER OR OUT PARAMETER SUBCOMPONENT THAT DOES NOT HAVE AN
27
-- ACCESS TYPE.
28
 
29
-- JWC 6/25/85
30
 
31
WITH REPORT; USE REPORT;
32
PROCEDURE C95074C IS
33
 
34
BEGIN
35
 
36
     TEST ("C95074C", "CHECK THAT ATTRIBUTES MAY BE APPLIED TO " &
37
                      "NON-ACCESS FORMAL OUT PARAMETERS");
38
 
39
     DECLARE
40
 
41
          TYPE ARR IS ARRAY (1 .. 10) OF NATURAL;
42
 
43
          TYPE REC IS RECORD
44
               A : ARR;
45
          END RECORD;
46
 
47
          A1 : ARR;
48
          R1 : REC;
49
 
50
          TASK T1 IS
51
               ENTRY E (A2 : OUT ARR; R2 : OUT REC);
52
          END T1;
53
 
54
          TASK BODY T1 IS
55
          BEGIN
56
               ACCEPT E (A2 : OUT ARR; R2 : OUT REC) DO
57
 
58
                    IF A2'FIRST /= 1 THEN
59
                         FAILED ("WRONG VALUE FOR A2'FIRST");
60
                    END IF;
61
 
62
                    IF A2'LAST /= 10 THEN
63
                         FAILED ("WRONG VALUE FOR A2'LAST");
64
                    END IF;
65
 
66
                    IF A2'LENGTH /= 10 THEN
67
                         FAILED ("WRONG VALUE FOR A2'LENGTH");
68
                    END IF;
69
 
70
                    IF (1 NOT IN A2'RANGE) OR
71
                       (10 NOT IN A2'RANGE) OR
72
                       (0 IN A2'RANGE) OR
73
                       (11 IN A2'RANGE) THEN
74
                         FAILED ("WRONG VALUE FOR A2'RANGE");
75
                    END IF;
76
 
77
                    IF R2.A'FIRST /= 1 THEN
78
                         FAILED ("WRONG VALUE FOR R2.A'FIRST");
79
                    END IF;
80
 
81
                    IF R2.A'LAST /= 10 THEN
82
                         FAILED ("WRONG VALUE FOR R2.A'LAST");
83
                    END IF;
84
 
85
                    IF R2.A'LENGTH /= 10 THEN
86
                         FAILED ("WRONG VALUE FOR R2.A'LENGTH");
87
                    END IF;
88
 
89
                    IF (1 NOT IN R2.A'RANGE) OR
90
                       (10 NOT IN R2.A'RANGE) OR
91
                       (0 IN R2.A'RANGE) OR
92
                       (11 IN R2.A'RANGE) THEN
93
                         FAILED ("WRONG VALUE FOR R2.A'RANGE");
94
                    END IF;
95
               END E;
96
          END T1;
97
 
98
     BEGIN
99
          T1.E (A1,R1);
100
     END;
101
 
102
     RESULT;
103
END C95074C;

powered by: WebSVN 2.1.0

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