aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/fixedpnt7.adb
blob: 635b9847db7f0d32da3d9e81ad3d243408d8c17a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--  { dg-do run }

procedure Fixedpnt7 is
   type F1 is delta 1.0 range -2.0**63 .. 0.0
     with Small => 1.0;
   type F2 is delta 4.0 range 0.0 .. 2.0**64
     with Small => 4.0;
   type D is delta 1.0 digits 18;

   XX : constant := -2.0**63;
   YY : constant := 2.0**64;

   X : F1 := XX;
   Y : F2 := YY;
   U : D := D'Round(X / Y);
begin
   if U /= -1.0 then
      raise Program_Error;
   end if;
end Fixedpnt7;