Update copyright year range in header of all files managed by GDB
[binutils-gdb.git] / gdb / testsuite / gdb.ada / packed_array / pa.adb
blob5c7ba5871200d33d5f363255db1101e822933abd
1 -- Copyright 2005-2023 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.
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/>.
16 with Pck; use Pck;
18 procedure PA is
20 type Packed_Array is array (4 .. 8) of Boolean;
21 pragma pack (Packed_Array);
23 Var : Packed_Array;
25 -- Unconstrained packed array (bounds are dynamic).
26 type Unconstrained_Packed_Array is array (Integer range <>) of Boolean;
28 U_Var : Unconstrained_Packed_Array (1 .. Ident (6));
30 -- Note that this array is not packed.
31 type Outer_Array is array (1 .. 4) of Packed_Array;
32 O_Var : Outer_Array := ((true, false, true, false, true),
33 (true, false, true, false, true),
34 (true, false, true, false, true),
35 (true, false, true, false, true));
37 type Outer_Array2 is array (1 .. 4) of Packed_Array;
38 pragma pack (Outer_Array2);
39 O2_Var : Outer_Array2 := ((true, false, true, false, true),
40 (true, false, true, false, true),
41 (true, false, true, false, true),
42 (true, false, true, false, true));
44 begin
46 Var := (True, False, True, False, True);
47 U_Var := (True, False, False, True, True, False);
49 Var (8) := False; -- STOP
50 U_Var (U_Var'Last) := True;
52 end PA;