* double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
[official-gcc.git] / gcc / testsuite / gnat.dg / overflow_fixed.adb
blob6ece51523339e282a1464396bbd12a80210eb0ef
1 -- { dg-do run }
2 -- { dg-options "-gnato -O" }
4 procedure Overflow_Fixed is
6 type Unsigned_8_Bit is mod 2**8;
8 procedure Fixed_To_Eight (Value : Duration) is
9 Item : Unsigned_8_Bit;
10 begin
11 Item := Unsigned_8_Bit(Value);
12 raise Program_Error;
13 exception
14 when Constraint_Error => null; -- expected case
15 end;
17 begin
18 Fixed_To_Eight (-0.5);
19 end;