aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/opt21_pkg.adb
blob: 3c87321dbffe53b3ab5876a138468d8ec8cfdec7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package body Opt21_Pkg is

   function Get_Object (Object : not null access R) return System.Address is
   begin
      return Object.Ptr;
   end;

   function Convert (W : Obj) return System.Address is
   begin
      if W = null then
         return System.Null_Address;
      else
         return Get_Object (W);
      end if;
   end;

end Opt21_Pkg;