{
public:
using range_operator_float::fold_range;
+ using range_operator_float::op1_range;
virtual bool fold_range (irange &r, tree type, const frange &lh,
const irange &, relation_kind) const
{
}
return false;
}
+ virtual bool op1_range (frange &r, tree type, const irange &lhs,
+ const frange &, relation_kind) const override
+ {
+ if (lhs.zero_p ())
+ {
+ r.set (type, dconst0, frange_val_max (type));
+ r.update_nan (false);
+ return true;
+ }
+ if (!lhs.contains_p (build_zero_cst (lhs.type ())))
+ {
+ REAL_VALUE_TYPE dconstm0 = dconst0;
+ dconstm0.sign = 1;
+ r.set (type, frange_val_min (type), dconstm0);
+ r.update_nan (true);
+ return true;
+ }
+ return false;
+ }
} op_cfn_signbit;
// Implement range operator for CFN_BUILT_IN_TOUPPER and CFN_BUILT_IN_TOLOWER.
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O2 -ffinite-math-only -fdump-tree-evrp" }
+
+void link_error();
+
+void foo(float x)
+{
+ if (__builtin_signbit (x))
+ {
+ if (x > 0.0)
+ link_error();
+ }
+}
+
+// { dg-final { scan-tree-dump-not "link_error" "evrp" } }