view gcc/testsuite/gnat.dg/opt21_pkg.adb @ 127:4c56639505ff

fix function.c and add CbC-example Makefile
author mir3636
date Wed, 11 Apr 2018 18:46:58 +0900
parents 04ced10e8804
children
line wrap: on
line source

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;