[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Evaluate / folding18.f90
blob9110689cf5d63dadd1bda7384bf382c22f7d11d8
1 ! RUN: %python %S/test_folding.py %s %flang_fc1
2 ! Test implementations of IEEE inquiry functions
3 module m
4 use ieee_arithmetic
5 logical, parameter :: test_ieee_support_datatype = ieee_support_datatype() &
6 .and. ieee_support_datatype(1.0_2) &
7 .and. ieee_support_datatype(1.0_3) &
8 .and. ieee_support_datatype(1.0_4) &
9 .and. ieee_support_datatype(1.0_8) &
10 .and. ieee_support_datatype(1.0_10) &
11 .and. ieee_support_datatype(1.0_16)
12 logical, parameter :: test_ieee_support_denormal = ieee_support_denormal() &
13 .and. ieee_support_denormal(1.0_2) &
14 .and. ieee_support_denormal(1.0_3) &
15 .and. ieee_support_denormal(1.0_4) &
16 .and. ieee_support_denormal(1.0_8) &
17 .and. ieee_support_denormal(1.0_10) &
18 .and. ieee_support_denormal(1.0_16)
19 logical, parameter :: test_ieee_support_divide = ieee_support_divide() &
20 .and. ieee_support_divide(1.0_2) &
21 .and. ieee_support_divide(1.0_3) &
22 .and. ieee_support_divide(1.0_4) &
23 .and. ieee_support_divide(1.0_8) &
24 .and. ieee_support_divide(1.0_10) &
25 .and. ieee_support_divide(1.0_16)
26 logical, parameter :: test_ieee_support_inf = ieee_support_inf() &
27 .and. ieee_support_inf(1.0_2) &
28 .and. ieee_support_inf(1.0_3) &
29 .and. ieee_support_inf(1.0_4) &
30 .and. ieee_support_inf(1.0_8) &
31 .and. ieee_support_inf(1.0_10) &
32 .and. ieee_support_inf(1.0_16)
33 logical, parameter :: test_ieee_support_io = ieee_support_io() &
34 .and. ieee_support_io(1.0_2) &
35 .and. ieee_support_io(1.0_3) &
36 .and. ieee_support_io(1.0_4) &
37 .and. ieee_support_io(1.0_8) &
38 .and. ieee_support_io(1.0_10) &
39 .and. ieee_support_io(1.0_16)
40 logical, parameter :: test_ieee_support_nan = ieee_support_nan() &
41 .and. ieee_support_nan(1.0_2) &
42 .and. ieee_support_nan(1.0_3) &
43 .and. ieee_support_nan(1.0_4) &
44 .and. ieee_support_nan(1.0_8) &
45 .and. ieee_support_nan(1.0_10) &
46 .and. ieee_support_nan(1.0_16)
47 logical, parameter :: test_ieee_support_sqrt = ieee_support_sqrt() &
48 .and. ieee_support_sqrt(1.0_2) &
49 .and. ieee_support_sqrt(1.0_3) &
50 .and. ieee_support_sqrt(1.0_4) &
51 .and. ieee_support_sqrt(1.0_8) &
52 .and. ieee_support_sqrt(1.0_10) &
53 .and. ieee_support_sqrt(1.0_16)
54 logical, parameter :: test_ieee_support_standard = ieee_support_standard() &
55 .and. ieee_support_standard(1.0_2) &
56 .and. ieee_support_standard(1.0_3) &
57 .and. ieee_support_standard(1.0_4) &
58 .and. ieee_support_standard(1.0_8) &
59 .and. ieee_support_standard(1.0_10) &
60 .and. ieee_support_standard(1.0_16)
61 logical, parameter :: test_ieee_support_subnormal = ieee_support_subnormal() &
62 .and. ieee_support_subnormal(1.0_2) &
63 .and. ieee_support_subnormal(1.0_3) &
64 .and. ieee_support_subnormal(1.0_4) &
65 .and. ieee_support_subnormal(1.0_8) &
66 .and. ieee_support_subnormal(1.0_10) &
67 .and. ieee_support_subnormal(1.0_16)
68 logical, parameter :: test_ieee_support_underflow_control = ieee_support_underflow_control() &
69 .and. ieee_support_underflow_control(1.0_2) &
70 .and. ieee_support_underflow_control(1.0_3) &
71 .and. ieee_support_underflow_control(1.0_4) &
72 .and. ieee_support_underflow_control(1.0_8) &
73 .and. ieee_support_underflow_control(1.0_10) &
74 .and. ieee_support_underflow_control(1.0_16)
75 end module