https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68264
Bug ID: 68264 Summary: tree-call-cdce wrongly uses ordered comparisons Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jsm28 at gcc dot gnu.org Target Milestone: --- When tree-call-cdce.c:gen_conditions_for_domain generates comparisons to test if a function argument is within a range for which errno cannot be set, it uses ordered comparisons LT_EXPR LE_EXPR GT_EXPR GE_EXPR. But these will raise "invalid" for quiet NaNs, when the functions should generally return a quiet NaN with no exceptions raised. Unordered comparisons should be used instead.