be8d214220ffe716d178f838383c571c0fb1ca6c
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.ada / same_component_name / pck.ads
1 -- Copyright 2017-2021 Free Software Foundation, Inc.
2 --
3 -- This program is free software; you can redistribute it and/or modify
4 -- it under the terms of the GNU General Public License as published by
5 -- the Free Software Foundation; either version 3 of the License, or
6 -- (at your option) any later version.
7 --
8 -- This program is distributed in the hope that it will be useful,
9 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
10 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 -- GNU General Public License for more details.
12 --
13 -- You should have received a copy of the GNU General Public License
14 -- along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 with System;
17
18 package Pck is
19
20 package Top is
21 type Top_T is tagged private;
22 type Top_A is access Top_T'Class;
23 procedure Assign (Obj: in out Top_T; TV : Integer);
24 private
25 type Top_T is tagged record
26 N : Integer := 1;
27 A : Integer := 48;
28 end record;
29 end Top;
30
31 package Middle is
32 type Middle_T is new Top.Top_T with private;
33 type Middle_A is access Middle_T'Class;
34 procedure Assign (Obj: in out Middle_T; MV : Character);
35 private
36 type Middle_T is new Top.Top_T with record
37 N : Character := 'a';
38 end record;
39 end Middle;
40
41 type Bottom_T is new Middle.Middle_T with record
42 N : Float := 4.0;
43 X : Integer := 6;
44 A : Character := 'J';
45 end record;
46 type Bottom_A is access Bottom_T'Class;
47 procedure Assign (Obj: in out Bottom_T; BV : Float);
48
49 procedure Do_Nothing (A : System.Address);
50
51 type Integer_Array is array (Natural range <>) of Integer;
52
53 package Dyn_Top is
54 type Dyn_Top_T (Disc : Natural) is tagged private;
55 type Dyn_Top_A is access Dyn_Top_T'Class;
56 procedure Assign (Obj: in out Dyn_Top_T; TV : Integer);
57 private
58 type Dyn_Top_T (Disc : Natural) is tagged record
59 S : Integer_Array (1 .. Disc) := (others => Disc);
60 N : Integer := 1;
61 A : Integer := 48;
62 end record;
63 end Dyn_Top;
64
65 package Dyn_Middle is
66 type Dyn_Middle_T is new Dyn_Top.Dyn_Top_T with private;
67 type Dyn_Middle_A is access Dyn_Middle_T'Class;
68 procedure Assign (Obj: in out Dyn_Middle_T; MV : Character);
69 private
70 type Dyn_Middle_T is new Dyn_Top.Dyn_Top_T with record
71 N : Character := 'a';
72 U : Integer := 42;
73 end record;
74 end Dyn_Middle;
75
76 end Pck;
This page took 0.032314 seconds and 3 git commands to generate.