1-- C83F03B.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 PACKAGE BODY IS NESTED INSIDE ANOTHER PACKAGE BODY 26-- THE INNER PACKAGE BODY CAN CONTAIN A LABEL IDENTIFIER IDENTICAL 27-- TO A LABEL IDENTIFIER IN THE OUTER PACKAGE BODY, TO AN IDENTI- 28-- FIER DECLARED IN THE OUTER PACKAGE BODY OR IN ITS SPECIFICATION, 29-- OR TO A LABEL IDENTIFIER OR OTHER IDENTIFIER IN THE 30-- ENVIRONMENT SURROUNDING THE OUTER PACKAGE BODY. 31 32 33-- INTERACTIONS WITH SEPARATE COMPILATION ARE TESTED IN C83F03C , 34-- C83F03D . 35 36 37-- RM 04 SEPTEMBER 1980 38 39 40WITH REPORT; 41PROCEDURE C83F03B IS 42 43 USE REPORT; 44 45 X1 , X2 : INTEGER RANGE 1..23 := 17 ; 46 47 TYPE T1 IS ( A , B , C) ; 48 49 Z : T1 := A ; 50 51 FLOW_INDEX : INTEGER := 0 ; 52 53BEGIN 54 55 TEST( "C83F03B" , "CHECK THAT IF A PACKAGE BODY IS NESTED" & 56 " INSIDE ANOTHER PACKAGE BODY, THE INNER" & 57 " PACKAGE BODY CAN CONTAIN A LABEL IDENTIFIER" & 58 " IDENTICAL TO A LABEL IDENTIFIER IN THE OUTER" & 59 " PACKAGE BODY, TO AN IDENTIFIER DECLARED IN" & 60 " THE OUTER PACKAGE BODY OR IN ITS SPECIFICA" & 61 "TION, OR TO A LABEL IDENTIFIER OR OTHER" & 62 " IDENTIFIER IN THE ENVIRONMENT SURROUNDING" & 63 " THE OUTER PACKAGE BODY" ) ; 64 65 66 DECLARE 67 68 69 Y1 , Y2 : INTEGER := 100 ; 70 71 X2 : INTEGER := 100 ; 72 73 74 PROCEDURE BUMP IS 75 BEGIN 76 FLOW_INDEX := FLOW_INDEX + 1 ; 77 END BUMP ; 78 79 80 PACKAGE OUTER IS 81 82 Y3 : INTEGER := 100 ; 83 84 TYPE T3 IS ( D , E , F ) ; 85 86 PACKAGE P IS 87 AA : BOOLEAN := FALSE ; 88 END P ; 89 90 END OUTER ; 91 92 93 PACKAGE BODY OUTER IS 94 95 Y4 : INTEGER := 200 ; 96 97 TYPE T4 IS ( G , H , I ) ; 98 99 PACKAGE BODY P IS 100 BEGIN 101 102 103 GOTO X1 ; 104 105 BUMP ; 106 BUMP ; 107 108 <<X1>> BUMP ; GOTO X2 ; 109 BUMP ; 110 <<T1>> BUMP ; GOTO Z ; 111 BUMP ; 112 <<Y1>> BUMP ; GOTO Y2 ; 113 BUMP ; 114 <<Y2>> BUMP ; GOTO T1 ; 115 BUMP ; 116 <<X2>> BUMP ; GOTO Y1 ; 117 BUMP ; 118 <<Z >> BUMP ; GOTO T3 ; 119 BUMP ; 120 <<T3>> BUMP ; GOTO T4 ; 121 BUMP ; 122 <<LABEL_IN_OUTER>> BUMP ; GOTO LABEL_IN_MAIN ; 123 BUMP ; 124 <<Y3>> BUMP ; GOTO Y4 ; 125 BUMP ; 126 <<Y4>> BUMP ; GOTO LABEL_IN_OUTER ; 127 BUMP ; 128 <<T4>> BUMP ; GOTO Y3 ; 129 BUMP ; 130 <<LABEL_IN_MAIN >> BUMP ; GOTO ENDING ; 131 BUMP ; 132 133 << ENDING >> NULL; 134 135 END P ; 136 137 BEGIN 138 139 << LABEL_IN_OUTER >> NULL ; 140 141 END OUTER ; 142 143 144 BEGIN 145 146 << LABEL_IN_MAIN >> 147 148 IF FLOW_INDEX /= 12 149 THEN FAILED( "INCORRECT FLOW OF CONTROL" ); 150 END IF; 151 152 END ; 153 154 155 RESULT; -- POSS. ERROR DURING ELABORATION OF P 156 157END C83F03B; 158