Debian Codegraph @

gcc/testsuite/gnat.dg/bias1.adb

raw
1 -- { dg-do compile }
2 -- { dg-options "-cargs -g -dA -gnatws -fgnat-encodings=gdb -margs" }
3 -- { dg-final { scan-assembler "DW_AT_GNU_bias" } }
4 -- { dg-final { scan-assembler-times "-7.*DW_AT_GNU_bias" 1 } }
5
6 procedure Bias1 is
7 type Small is range -7 .. -4;
8 for Small'Size use 2;
9 Y : Small := -5;
10 Y1 : Small := -7;
11
12 type Byte is mod 256;
13 type Repeat_Count_T is new Byte range 1 .. 2 ** 6;
14 for Repeat_Count_T'Size use 6;
15 X : Repeat_Count_T := 64;
16 X1 : Repeat_Count_T := 1;
17
18 type Char_Range is range 65 .. 68;
19 for Char_Range'Size use 2;
20 Cval : Char_Range := 65;
21
22 type SomePackedRecord is record
23 R: Small;
24 S: Small;
25 end record;
26 pragma Pack (SomePackedRecord);
27 SPR : SomePackedRecord := (R => -4, S => -5);
28
29 type Packed_Array is array (1 .. 3) of Small;
30 pragma pack (Packed_Array);
31 A : Packed_Array := (-7, -5, -4);
32
33 begin
34 null;
35 end Bias1;