view gcc/testsuite/gnat.dg/limited_with4.adb @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
children
line wrap: on
line source

-- { dg-do compile }

with Limited_With4_Pkg;

package body Limited_With4 is

  procedure Proc1 (A : Limited_With4_Pkg.Rec12 ; I : Integer) is
  begin
    if A.R.I /= I then
      raise Program_Error;
    end if;
  end;

  function Func1 (I : Integer) return Limited_With4_Pkg.Rec12 is
  begin
    return (I => I, R => (I => I));
  end;

  procedure Proc2 (A : Limited_With4_Pkg.Rec22 ; I : Integer) is
  begin
    if A.R.I /= I then
      raise Program_Error;
    end if;
  end;

  function Func2 (I : Integer) return Limited_With4_Pkg.Rec22 is
  begin
    return (I => I, R => (I => I));
  end;

  procedure Proc3 (A : Limited_With4_Pkg.Rec12 ; B : Limited_With4_Pkg.Rec22) is
  begin
    if A.R.I /= B.R.I then
      raise Program_Error;
    end if;
  end;

  function Func3 (A : Limited_With4_Pkg.Rec12) return Limited_With4_Pkg.Rec22 is
  begin
    return (I => A.R.I, R => (I => A.R.I));
  end;

end Limited_With4;