There is a path in which clear_nan() is called on an UNDEFINED range, which is not allowed.  This patch simply makes sure VARYING is set before calling clear_nan(). In operator_not_equal, we should check if op1 == op1 AFTER the check for a singleton. operator_ordered was also cealring the NAN on the false side, and should be setting it. None of these paths were being executed to this point as GORI was not passing in the relation between op1 and op2, but the next patch changes that and would trigger these issues. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew