https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123307
Igor Shevlyakov <ishevlyakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Target Milestone|--- |17.0
Known to work| |17.0
Resolution|--- |FIXED
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=127786
Known to fail| |15.3.0, 16.2.0
--- Comment #4 from Igor Shevlyakov <ishevlyakov at gcc dot gnu.org> ---
Fixed on trunk by r17-5641-g400a1d5536978e (PR127786):
https://gcc.gnu.org/g:400a1d5536978e7392781151bd14aea85f9f90d1
reassoc passed TRUTH_ANDIF_EXPR to combine_comparisons although it combines
the operands of a BIT_AND_EXPR, both of which are evaluated. So in f2
_5 = a == b; _8 = a >= b; _9 = _5 & _8;
became a quiet a == b and the FE_INVALID of a >= b was lost. reassoc now
passes TRUTH_AND_EXPR and the signaling comparison is kept.
With a quiet NaN, f2 and f3 now raise FE_INVALID at -O1, -O2 and -O3 on
trunk; 15.3.0 and 16.2.0 still don't. The case is covered by
gcc.dg/torture/cmp-of-cmp-fenv-2.c (le_and_eq).