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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c48010a.ada] - Blame information for rev 399

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C48010A.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 NULL ARRAYS AND NULL RECORDS CAN BE ALLOCATED.
26
 
27
-- EG  08/30/84
28
 
29
WITH REPORT;
30
 
31
PROCEDURE C48010A IS
32
 
33
     USE REPORT;
34
 
35
BEGIN
36
 
37
     TEST("C48010A","CHECK THAT NULL ARRAYS AND NULL RECORDS CAN " &
38
                    "BE ALLOCATED");
39
 
40
     DECLARE
41
 
42
          TYPE CA IS ARRAY(4 .. 3) OF INTEGER;
43
          TYPE CR IS
44
               RECORD
45
                    NULL;
46
               END RECORD;
47
 
48
          TYPE A_CA IS ACCESS CA;
49
          TYPE A_CR IS ACCESS CR;
50
 
51
          TYPE AA_CA IS ACCESS A_CA;
52
          TYPE AA_CR IS ACCESS A_CR;
53
 
54
          V_A_CA  : A_CA;
55
          V_A_CR  : A_CR;
56
          V_AA_CA : AA_CA;
57
          V_AA_CR : AA_CR;
58
 
59
     BEGIN
60
 
61
          V_A_CA := NEW CA;
62
          IF V_A_CA = NULL THEN
63
               FAILED ("NULL ARRAY WAS NOT ALLOCATED - CA");
64
          ELSIF V_A_CA.ALL'FIRST /= 4 AND V_A_CA.ALL'LAST /= 3 THEN
65
               FAILED ("NULL ARRAY BOUNDS ARE INCORRECT - CA");
66
          END IF;
67
 
68
          V_A_CR := NEW CR;
69
          IF V_A_CR = NULL THEN
70
               FAILED ("NULL RECORD WAS NOT ALLOCATED - CR");
71
          END IF;
72
 
73
          V_AA_CA := NEW A_CA'(NEW CA);
74
          IF V_AA_CA.ALL = NULL THEN
75
               FAILED ("NULL ARRAY WAS NOT ALLOCATED - A_CA");
76
          ELSIF V_AA_CA.ALL.ALL'FIRST /= 4 AND
77
                V_AA_CA.ALL.ALL'LAST /= 3 THEN
78
               FAILED ("NULL ARRAY BOUNDS ARE INCORRECT - A_CA");
79
          END IF;
80
 
81
          V_AA_CR := NEW A_CR'(NEW CR);
82
          IF (V_AA_CR = NULL OR V_AA_CR.ALL = NULL) THEN
83
               FAILED ("NULL RECORD WAS NOT ALLOCATED - A_CR");
84
          END IF;
85
 
86
     END;
87
 
88
     RESULT;
89
 
90
END C48010A;

powered by: WebSVN 2.1.0

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