Rebase.
[official-gcc.git] / gcc / testsuite / gfortran.dg / ieee / ieee_5.f90
blob4ef15252e03065c1d85f63fdf45aadf2aa3a3d35
1 ! { dg-do run }
3 use :: ieee_arithmetic
4 implicit none
6 logical mode
8 ! Test IEEE_SET_UNDERFLOW_MODE, IEEE_GET_UNDERFLOW_MODE,
9 ! and IEEE_SUPPORT_UNDERFLOW_CONTROL
11 ! We don't have any targets where this is supported yet, so
12 ! we just check these subroutines are present.
14 if (ieee_support_underflow_control() &
15 .or. ieee_support_underflow_control(0.)) then
17 call ieee_get_underflow_mode(mode)
18 call ieee_set_underflow_mode(.false.)
19 call ieee_set_underflow_mode(.true.)
20 call ieee_set_underflow_mode(mode)
22 end if
24 if (ieee_support_underflow_control() &
25 .or. ieee_support_underflow_control(0.d0)) then
27 call ieee_get_underflow_mode(mode)
28 call ieee_set_underflow_mode(.false.)
29 call ieee_set_underflow_mode(.true.)
30 call ieee_set_underflow_mode(mode)
32 end if
34 end