2017-09-29 Yury Gribov <tetra2005@gmail.com>
PR middle-end/82319
gcc/
* match.pd: Fix handling of NaNs in pattern.
gcc/testsuite/
* c-c++/common/pr57371-4.c: Test NaN comparisons.
From-SVN: r253307
+2017-09-29 Yury Gribov <tetra2005@gmail.com>
+
+ PR middle-end/82319
+ * match.pd: Fix handling of NaNs in pattern.
+
2017-09-29 Jeff Law <law@redhat.com>
* sbitmap.c (bitmap_bit_in_range_p): New function.
else
real_trunc (&icst, fmt, cst);
- bool cst_int_p = real_identical (&icst, cst);
+ bool cst_int_p = !real_isnan (cst) && real_identical (&icst, cst);
bool overflow_p = false;
wide_int icst_val
+2017-09-29 Yury Gribov <tetra2005@gmail.com>
+
+ PR middle-end/82319
+ * c-c++/common/pr57371-4.c: Test NaN comparisons.
+
2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
* g++.dg/other/dump-ada-spec-10.C: New test.
nonfinite_10 = (float) x != SNAN;
/* { dg-final { scan-tree-dump "nonfinite_10 = \\(float\\)" "original" } } */
}
+
+ {
+ volatile int nonfinite_11;
+ nonfinite_11 = (float) x == QNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_11 = 0" "original" } } */
+ }
+
+ {
+ volatile int nonfinite_12;
+ nonfinite_12 = (float) x != QNAN;
+ /* { dg-final { scan-tree-dump "nonfinite_12 = 1" "original" } } */
+ }
}