1--  Copyright 2019-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.
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
16with Pck; use Pck;
17
18procedure Bias is
19   type Small is range -7 .. -4;
20   for Small'Size use 2;
21   Y : Small := -5;
22   Y1 : Small := -7;
23
24   type Repeat_Count_T is range 1 .. 2 ** 6;
25   for Repeat_Count_T'Size use 6;
26   X : Repeat_Count_T := 60;
27   X1 : Repeat_Count_T := 1;
28
29   type Char_Range is range 65 .. 68;
30   for Char_Range'Size use 2;
31   Cval : Char_Range := 65;
32
33   type Some_Packed_Record is record
34      R: Small;
35      S: Small;
36   end record;
37   pragma Pack (Some_Packed_Record);
38   SPR : Some_Packed_Record := (R => -4, S => -5);
39
40   type Packed_Array is array (1 .. 3) of Small;
41   pragma pack (Packed_Array);
42   A : Packed_Array := (-7, -5, -4);
43
44begin
45   Do_Nothing (Y'Address);		--  STOP
46   Do_Nothing (Y1'Address);
47   Do_Nothing (X'Address);
48   Do_Nothing (X1'Address);
49   Do_Nothing (Cval'Address);
50   Do_Nothing (SPR'Address);
51   Do_Nothing (A'Address);
52end Bias;
53