analyzer: Fix PR analyzer/101980
[official-gcc.git] / gcc / testsuite / gnat.dg / inline15_gen.adb
blobf2b17f8af3029a1b4322fb347df682624814b3ad
1 package body Inline15_Gen is
2 function Initialize (Val : Inline15_Types.Enum) return Inline15_Types.Rec;
3 procedure Print (Val : Inline15_Types.Rec);
5 procedure Call_Func is
6 Result : constant Inline15_Types.Rec := Func (Inline15_Types.Two);
7 begin
8 null;
9 end Call_Func;
11 function Func (Val : Inline15_Types.Enum) return Inline15_Types.Rec is
12 begin
13 return Result : constant Inline15_Types.Rec := Initialize (Val) do
14 Print (Result);
15 end return;
16 end Func;
18 function Initialize (Val : Inline15_Types.Enum) return Inline15_Types.Rec is
19 pragma Warnings (Off);
20 Result : Inline15_Types.Rec (Val);
21 pragma Warnings (On);
22 begin
23 return Result;
24 end Initialize;
26 procedure Print (Val : Inline15_Types.Rec) is begin null; end Print;
27 end Inline15_Gen;