Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.ada / rec_ptype / p.ads
CommitLineData
88b9d363 1-- Copyright 2020-2022 Free Software Foundation, Inc.
8d9fd3a1
TT
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
16package P is
17
18 type Kind_Type is (No_Kind, A_Kind, B_Kind);
19
20 type PID_Type is new Integer;
21 Default_Value : constant PID_Type := 0;
22
23 type Name_Type is array (1 ..3) of Character;
24 Name_Default_Value : constant Name_Type := "AAA";
25
26 type Variable_Record_Type(Kind : Kind_Type := No_Kind) is record
27 case Kind is
28 when A_Kind =>
29 Variable_Record_A : PID_Type := Default_Value;
30
31 when B_Kind =>
32 Variable_Record_B : Name_Type := Name_Default_Value;
33
34 when No_Kind =>
35 null;
36
37 end case;
38 end record;
39
40 type Complex_Variable_Record_Type (Kind : Kind_Type := No_Kind) is record
41 Complex_Variable_Record_Variable_Record : Variable_Record_Type(Kind);
42 end record;
43
44 type Top_Level_Record_Type is record
45 Top_Level_Record_Complex_Record : Complex_Variable_Record_Type;
46 end record;
47
48end P;
This page took 0.138631 seconds and 4 git commands to generate.