Message ID | 20221022142529.376406-1-aldyh@redhat.com |
---|---|
State | New |
Headers | show |
Series | [COMMITTED] Update selftest such that [-Inf, +Inf] is always VARYING for -ffinite-math-only. | expand |
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index bcda4987307..d779e9819e2 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -3960,8 +3960,11 @@ range_tests_floats () if (r0.maybe_isnan ()) ASSERT_TRUE (r0.varying_p ()); // ...unless it has some special property... - r0.clear_nan (); - ASSERT_FALSE (r0.varying_p ()); + if (!flag_finite_math_only) + { + r0.clear_nan (); + ASSERT_FALSE (r0.varying_p ()); + } // For most architectures, where float and double are different // sizes, having the same endpoints does not necessarily mean the