cb3a1b3df075699ed6013b86b8e0ada34e8b9785
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.ada / packed_array_assign / aggregates.ads
1 -- Copyright 2018-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 package Aggregates is
17 subtype Int is Integer range 0 .. 7;
18
19 type Packed_Rec is record
20 Packed_Array_Assign_W : Integer;
21 Packed_Array_Assign_X, Packed_Array_Assign_Y : Int;
22 end record;
23 pragma Pack (Packed_Rec);
24
25 type Packed_RecArr is array (Integer range <>) of Packed_Rec;
26 pragma Pack (Packed_RecArr);
27
28 type Nested_Packed is record
29 Q000 : Int;
30 R000 : Packed_Rec;
31 end record;
32 pragma Pack (Nested_Packed);
33
34 procedure Run_Test;
35
36 private
37 PR : Packed_Rec := (Packed_Array_Assign_Y => 3,
38 Packed_Array_Assign_W => 104,
39 Packed_Array_Assign_X => 2);
40 PRA : Packed_RecArr (1 .. 3);
41 NPR : Nested_Packed := (q000 => 3, r000 => (packed_array_assign_x => 6, packed_array_assign_y => 1, packed_array_assign_w => 117));
42 end Aggregates;
This page took 0.030842 seconds and 3 git commands to generate.