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

procedure Renaming13 is
   type Stack_Type_Base is array (Natural range <>) of Integer;

   procedure Foo (Buf : in out Stack_Type_Base) is
      S : Stack_Type_Base renames Buf;

      procedure Init is
      begin
         S := (others => 0);
      end;

   begin
      Init;
   end;

   Temp : Stack_Type_Base (1 .. 100);
begin
   Foo (Temp);
end;