runtime: allow preemption in fast syscall return
[official-gcc.git] / gcc / testsuite / gnat.dg / opt34.adb
blob546768a1fe8044490c130155f9a8f5939bc0084c
1 -- { dg-do compile }
2 -- { dg-options "-O -fdump-tree-esra" }
4 with Opt34_Pkg; use Opt34_Pkg;
6 procedure Opt34 is
8 function Local_Fun (Arg : T_Private) return T_Private is
9 Result : T_Private;
10 begin
12 case Get_Integer (Arg) is
13 when 1 =>
14 Result := Get_Private (100);
15 when 2 =>
16 Result := T_Private_Zero;
17 when others =>
18 null;
19 end case;
21 return Result;
22 end Local_Fun;
24 begin
25 Assert (Get_Integer (Local_Fun (Get_Private (1))) = 100);
26 end;
28 -- { dg-final { scan-tree-dump "Created a replacement for result" "esra" } }