analyzer: Fix PR analyzer/101980
[official-gcc.git] / gcc / testsuite / gnat.dg / renaming14.adb
blobd61a82dca89a79a64c6ea057645241e4c9c62693
1 -- { dg-do run }
3 procedure Renaming14 is
4 type Rec_Typ is record
5 XX : Integer;
6 end record;
8 type Stack_Type_Base is array (Natural range <>) of Rec_Typ;
10 generic
11 S : in out Stack_Type_Base;
12 package Stack is
13 procedure Init;
14 end;
16 package body Stack is
17 procedure Init is
18 begin
19 S := (others => (XX => 0));
20 end;
21 end;
23 procedure Foo (Buf : in out Stack_Type_Base) is
24 package Stack_Inst is new Stack (Buf);
25 begin
26 Stack_Inst.Init;
27 end;
29 Temp : Stack_Type_Base (1 .. 100);
30 begin
31 Foo (Temp);
32 end;