summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/debug5.adb
blob: 6569a15802963821f728faf2e66cf44981aeffa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- { dg-do compile }
-- { dg-options "-g" }

procedure Debug5 is

   type Record_Type (L1, L2 : Natural) is record
      S1 : String (1 .. L1);
      case L2 is
         when 0      => null;
         when others => S2 : String (L1 .. L2);
      end case;
   end record;

   procedure Discard (R : Record_Type) is
   begin
      null;
   end Discard;

   R : constant Record_Type := (0, 0, others => <>);
begin
   Discard (R);
end Debug5;