2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / ada / acats / support / fa21a00.a
blob7af0da1d1cd1725191b1e53843f0a61344daa829
1 -- FA21A00.A
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.
16 -- DISCLAIMER
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 --*
26 -- FOUNDATION DESCRIPTION:
27 -- This foundation declares various supporting types, objects, and
28 -- subprograms for use in tests checking preelaborability.
30 -- CHANGE HISTORY:
31 -- 20 Mar 95 SAIC Initial prerelease version.
33 --!
35 with Ada.Finalization; -- Preelaborated library unit.
36 package FA21A00 is
38 pragma Preelaborate (FA21A00);
41 type My_Int is new Integer range 0 .. 100;
42 function Func return My_Int; -- Non-static function.
44 subtype Idx is Natural range 1 .. 5;
46 Three : constant My_Int := 3;
47 Ten : My_Int := 10; -- Non-static.
49 type RecWithDisc (D: My_Int) is record
50 Twice: My_Int := D*2;
51 end record;
53 type RecCallDefault is record
54 C : My_Int := Func;
55 D : My_Int := 0;
56 end record;
58 type RecPrimDefault is record
59 C : My_Int := Ten;
60 end record;
62 type Tag is tagged record
63 C : My_Int;
64 end record;
66 type AccTag is access all Tag;
68 Tag1: aliased Tag; -- OK.
70 type My_Controlled is new Ada.Finalization.Controlled with record
71 C : My_Int;
72 end record;
74 type ContComp is tagged record
75 C: My_Controlled;
76 end record;
78 task type Tsk (D: My_Int);
80 protected type Prot is
81 entry E;
82 end Prot;
84 type Priv is tagged private;
86 type PrivComp is array (1 .. 5) of Priv;
88 type Pri_Ext is new Tag with private;
90 type PriExtComp is array (1 .. 5) of Pri_Ext;
92 private
94 type Priv is tagged record
95 B: Boolean;
96 end record;
98 type Pri_Ext is new Tag with record
99 N: String (1 .. 5);
100 end record;
102 end FA21A00;
105 --===================================================================--
108 package body FA21A00 is
110 task body Tsk is
111 begin
112 null;
113 end Tsk;
115 protected body Prot is
116 entry E when False is
117 begin
118 null;
119 end E;
120 end Prot;
122 function Func return My_Int is
123 begin
124 return 0;
125 end Func;
127 end FA21A00;