aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/value-range.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index bcda498..d779e98 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