aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/bias1.adb
blob: 016a159b692da3df98d6c1bd8f3e94a6aa8f8525 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--  { dg-do compile }
--  { dg-options "-cargs -g -dA -gnatws -fgnat-encodings=gdb -margs" }
--  { dg-final { scan-assembler "DW_AT_GNU_bias" } }

procedure Bias1 is
   type Small is range -7 .. -4;
   for Small'Size use 2;
   Y : Small := -5;
   Y1 : Small := -7;

   type Byte is mod 256;
   type Repeat_Count_T is new Byte range 1 .. 2 ** 6;
   for Repeat_Count_T'Size use 6;
   X : Repeat_Count_T := 64;
   X1 : Repeat_Count_T := 1;

   type Char_Range is range 65 .. 68;
   for Char_Range'Size use 2;
   Cval : Char_Range := 65;

   type SomePackedRecord is record
      R: Small;
      S: Small;
   end record;
   pragma Pack (SomePackedRecord);
   SPR : SomePackedRecord := (R => -4, S => -5);

   type Packed_Array is array (1 .. 3) of Small;
   pragma pack (Packed_Array);
   A : Packed_Array := (-7, -5, -4);

begin
   null;
end Bias1;