summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/kill_value.adb
blob: d83842166e995fac1dc9b22c0023cbbee5da2a31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- { dg-do run }

procedure kill_value is
   type Struct;
   type Pstruct is access all Struct;
   
   type Struct is record Next : Pstruct; end record;
   
   Vap : Pstruct := new Struct;

begin
   for J in 1 .. 10 loop
      if Vap /= null then
         while Vap /= null
         loop
            Vap := Vap.Next;
         end loop;
      end if;
   end loop;
end;