Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gnat.dg / nan_max.adb
bloba2cac30f5e89f0a1698b19d6c747d5e63ec76006
1 -- { dg-do run }
3 procedure Nan_Max is
5 function NaN return Long_Float is
6 Zero : Long_Float := 0.0;
7 begin
8 return Zero / Zero;
9 end;
11 Z : Long_Float := 1.0;
12 N : Long_Float := NaN;
14 begin
15 if Long_Float'Max (N, Z) /= Z then
16 raise Program_Error;
17 end if;
19 if Long_Float'Max (Z, N) /= Z then
20 raise Program_Error;
21 end if;
23 if Long_Float'Max (NaN, Z) /= Z then
24 raise Program_Error;
25 end if;
27 if Long_Float'Max (Z, NaN) /= Z then
28 raise Program_Error;
29 end if;
30 end;