comparison gcc/testsuite/ada/acats/support/fc51c00.a @ 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 -- FC51C00.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.
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 --
26 -- FOUNDATION DESCRIPTION:
27 -- This foundation declares a hierarchy of tagged types, which includes
28 -- both abstract and non-abstract types, and which have both abstract
29 -- and non-abstract primitive subprograms.
30 --
31 -- CHANGE HISTORY:
32 -- 06 Dec 94 SAIC ACVC 2.0
33 -- 03 Nov 95 SAIC ACVC 2.0.1 fixes: Deleted primitive operation Proc
34 -- of Concrete_Root.
35 -- 11 Aug 96 SAIC ACVC 2.1: Changed procedure bodies to update
36 -- actual parameters.
37 --
38 --!
39
40 package FC51C00 is
41
42 --
43 -- Non-abstract ultimate ancestor type:
44 --
45
46 type Concrete_Root is tagged null record;
47
48 function Func (P: Concrete_Root) return Concrete_Root; -- Abstract when
49 -- inherited.
50
51
52 --
53 -- Abstract descendant of non-abstract ultimate ancestor:
54 --
55
56 type Abstract_Child is abstract new Concrete_Root with null record;
57
58 -- Inherits:
59 -- function Func (P: Abstract_Child) return Abstract_Child is abstract;
60
61 procedure Proc (P: in out Abstract_Child) is abstract; -- Abstract.
62 procedure New_Proc (P : out Abstract_Child) is abstract; -- Abstract.
63
64
65
66 --
67 -- Non-abstract descendant of abstract descendant:
68 --
69
70 type Concrete_GrandChild is new Abstract_Child with null record;
71
72 function Func (P: Concrete_GrandChild) return Concrete_GrandChild;
73
74 procedure Proc (P: in out Concrete_GrandChild);
75 procedure New_Proc (P : out Concrete_GrandChild);
76
77
78 end FC51C00;
79
80
81 --===================================================================--
82
83
84 package body FC51C00 is
85
86 Value : Concrete_GrandChild;
87
88
89 function Func (P: Concrete_Root) return Concrete_Root is
90 begin
91 return P;
92 end Func;
93
94
95 function Func (P: Concrete_GrandChild) return Concrete_GrandChild is
96 begin
97 return P;
98 end Func;
99
100
101 procedure Proc (P: in out Concrete_GrandChild) is
102 begin
103 P := Value;
104 end Proc;
105
106
107 procedure New_Proc (P : out Concrete_GrandChild) is
108 begin
109 P := Value;
110 end New_Proc;
111
112 end FC51C00;