comparison gcc/testsuite/ada/acats/tests/c4/c41309a.ada @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 -- C41309A.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 AN EXPANDED NAME IS ALLOWED EVEN IF A USE CLAUSE MAKES THE
26 -- EXPANDED NAME UNNECESSARY.
27
28 -- TBN 12/15/86
29
30 WITH REPORT; USE REPORT;
31 PROCEDURE C41309A IS
32
33 BEGIN
34 TEST ("C41309A", "CHECK THAT AN EXPANDED NAME IS ALLOWED EVEN " &
35 "IF A USE CLAUSE MAKES THE EXPANDED NAME " &
36 "UNNECESSARY");
37 DECLARE
38 PACKAGE P IS
39 PACKAGE Q IS
40 PACKAGE R IS
41 TYPE REC IS
42 RECORD
43 A : INTEGER := 5;
44 B : BOOLEAN := TRUE;
45 END RECORD;
46 REC1 : REC;
47 END R;
48
49 USE R;
50
51 REC2 : R.REC := R.REC1;
52 END Q;
53
54 USE Q; USE R;
55
56 REC3 : Q.R.REC := Q.REC2;
57 END P;
58
59 USE P; USE Q; USE R;
60
61 REC4 : P.Q.R.REC := P.REC3;
62 BEGIN
63 IF REC4 /= (IDENT_INT(5), IDENT_BOOL(TRUE)) THEN
64 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME");
65 END IF;
66 END;
67
68 RESULT;
69 END C41309A;