1-- { dg-do compile }
2-- { dg-options "-cargs -g -fgnat-encodings=minimal -dA -margs" }
3-- { dg-final { scan-assembler-not "DW_OP_const4u" } }
4-- { dg-final { scan-assembler-not "DW_OP_const8u" } }
5
6--  The DW_AT_byte_size attribute DWARF expression for the
7--  DW_TAG_structure_type DIE that describes Rec_Type contains the -4u literal.
8--  Check that it is not created using an inefficient encoding (DW_OP_const1s
9--  is expected).
10
11procedure Debug8 is
12
13   type Rec_Type (I : Integer) is record
14      B : Boolean;
15      case I is
16         when 0 =>
17            null;
18         when 1 .. 10 =>
19            C : Character;
20         when others =>
21            N : Natural;
22      end case;
23   end record;
24
25   R : access Rec_Type := null;
26
27begin
28   null;
29end Debug8;
30