aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/opt58.adb
blob: ac39cc06056e029bc745411c6a7f97dfc3c192f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- { dg-do compile }
-- { dg-options "-O" }

with Unchecked_Conversion;
with System; use System;
with Opt58_Pkg; use Opt58_Pkg;

procedure Opt58 is

   function Convert is new Unchecked_Conversion (Integer, Rec);

   Dword : Integer := 0;
   I : Small_Int := F1 (Convert (Dword));

begin
   if F2 (Null_Address, I = 0) then
      null;
   end if;
end Opt58;