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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- A83A02A.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 A LABEL IN A NESTED SUBPROGRAM OR PACKAGE CAN BE IDENTICAL
26
--    TO A LABEL OUTSIDE SUCH CONSTRUCT.  
27
 
28
 
29
-- "INSIDE LABEL":  INSIDE   * PACKAGE                    _PACK        A
30
--                           * FUNCTION INSIDE PACKAGE    _PACKFUN     B
31
--                           * PROCEDURE                  _PROC        C
32
--                           * PROCEDURE INSIDE BLOCK     _BLOCKPROC   D
33
 
34
-- "OUTSIDE LABEL": INSIDE   * MAIN                       _MAIN        1
35
--                           * BLOCK IN MAIN              _BLOCK       2
36
--                           * LOOP IN BLOCK IN MAIN      _BLOCKLOOP   3
37
--                           * LOOP IN MAIN               _LOOP        4
38
 
39
-- CASES TESTED:  A1  B2  A3  B4                           1 2 3 4
40
--                D1  C2  C3  D4
41
--                    D2          AB                  A    X . X .
42
--                                                    B    . X . X
43
--                                                    C    . X X .
44
--                                                    D    X . . X
45
 
46
 
47
-- RM 02/09/80
48
 
49
 
50
WITH REPORT ;
51
PROCEDURE  A83A02A  IS
52
 
53
     USE REPORT ;
54
 
55
     PROCEDURE  PROC1  IS
56
     BEGIN
57
          << LAB_PROC_BLOCK >>                NULL ;    -- C2   C       
58
          << LAB_PROC_BLOCKLOOP >>            NULL ;    -- C3
59
     END  PROC1 ;
60
 
61
     PACKAGE  PACK1  IS
62
          FUNCTION  F  RETURN INTEGER ;
63
     END  PACK1 ;
64
 
65
     PACKAGE BODY  PACK1  IS
66
          FUNCTION  F  RETURN INTEGER  IS
67
          BEGIN
68
               << LAB_PACKFUN_BLOCK >>        NULL ;    -- B2    B
69
               << LAB_PACKFUN_LOOP >>         NULL ;    -- B4
70
               << LAB_PACKFUN_PACK >>         NULL ;    -- BA (AB)
71
               RETURN 7 ;
72
          END  F ;
73
     BEGIN
74
          << LAB_PACK_MAIN >>                 NULL ;    -- A1    A
75
          << LAB_PACK_BLOCKLOOP >>            NULL ;    -- A3
76
          << LAB_PACKFUN_PACK >>              NULL ;    -- BA (AB)
77
     END  PACK1 ;
78
 
79
BEGIN
80
 
81
     TEST( "A83A02A" , "CHECK THAT A LABEL IN A NESTED SUBPROGRAM" &
82
                       " OR PACKAGE CAN BE IDENTICAL TO A LABEL"   &
83
                       " OUTSIDE SUCH CONSTRUCT" );
84
 
85
     << LAB_PACK_MAIN >>                      NULL ;    -- A1          1
86
     << LAB_BLOCKPROC_MAIN >>                 NULL ;    -- D1
87
 
88
 
89
     DECLARE  -- 
90
 
91
          PROCEDURE  PROC2  IS
92
          BEGIN
93
               << LAB_BLOCKPROC_MAIN >>       NULL ;    -- D1    D
94
               << LAB_BLOCKPROC_LOOP >>       NULL ;    -- D4
95
               << LAB_BLOCKPROC_BLOCK >>      NULL ;    -- D2
96
          END  PROC2 ;
97
 
98
     BEGIN
99
 
100
          << LAB_PACKFUN_BLOCK >>             NULL ;    -- B2          2
101
          << LAB_PROC_BLOCK >>                NULL ;    -- C2
102
          << LAB_BLOCKPROC_BLOCK >>           NULL ;    -- D2
103
 
104
          FOR  I  IN  1..2  LOOP
105
               << LAB_PACK_BLOCKLOOP >>       NULL ;    -- A3          3
106
               << LAB_PROC_BLOCKLOOP >>       NULL ;    -- C3
107
          END LOOP;
108
 
109
     END ;
110
 
111
     FOR  I  IN  1..2  LOOP
112
          << LAB_PACKFUN_LOOP >>              NULL ;    -- B4          4
113
          << LAB_BLOCKPROC_LOOP >>            NULL ;    -- D4
114
     END LOOP;
115
 
116
 
117
     RESULT ;
118
 
119
 
120
END A83A02A ;

powered by: WebSVN 2.1.0

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