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/] [c3/] [c32108b.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C32108B.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 IF A DEFAULT EXPRESSION IS EVALUATED FOR A COMPONENT, NO
26
-- DEFAULT EXPRESSIONS ARE EVALUATED FOR ANY SUBCOMPONENTS.
27
 
28
-- TBN 3/21/86
29
 
30
WITH REPORT; USE REPORT;
31
PROCEDURE C32108B IS
32
 
33
     FUNCTION DEFAULT_CHECK (NUMBER : INTEGER) RETURN INTEGER IS
34
     BEGIN
35
          IF NUMBER /= 0 THEN
36
               FAILED ("SUBCOMPONENT DEFAULT EXPRESSIONS ARE " &
37
                       "EVALUATED -" & INTEGER'IMAGE (NUMBER));
38
          END IF;
39
          RETURN (1);
40
     END DEFAULT_CHECK;
41
 
42
BEGIN
43
     TEST ("C32108B", "CHECK THAT IF A DEFAULT EXPRESSION IS " &
44
                      "EVALUATED FOR A COMPONENT, NO DEFAULT " &
45
                      "EXPRESSIONS ARE EVALUATED FOR ANY " &
46
                      "SUBCOMPONENTS");
47
 
48
     DECLARE     -- (A)
49
 
50
          TYPE REC_TYP1 IS
51
               RECORD
52
                    AGE : INTEGER := DEFAULT_CHECK (1);
53
               END RECORD;
54
 
55
          TYPE REC_TYP2 (D : INTEGER := DEFAULT_CHECK(2)) IS
56
               RECORD
57
                    NULL;
58
               END RECORD;
59
 
60
          TYPE REC_TYP3 (D : INTEGER := DEFAULT_CHECK(3)) IS
61
               RECORD
62
                    A : INTEGER := DEFAULT_CHECK(4);
63
               END RECORD;
64
 
65
          TYPE REC_TYP4 IS
66
               RECORD
67
                    ONE : REC_TYP1 := (AGE => DEFAULT_CHECK (0));
68
                    TWO : REC_TYP2 (DEFAULT_CHECK(0));
69
                    THREE : REC_TYP3 := (D => DEFAULT_CHECK (0),
70
                                         A => DEFAULT_CHECK (0));
71
               END RECORD;
72
 
73
          REC4 : REC_TYP4;
74
 
75
     BEGIN     -- (A)
76
          NULL;
77
     END;      -- (A)
78
 
79
     RESULT;
80
END C32108B;

powered by: WebSVN 2.1.0

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