https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80692
--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> --- Author: segher Date: Wed May 17 21:57:23 2017 New Revision: 248174 URL: https://gcc.gnu.org/viewcvs?rev=248174&root=gcc&view=rev Log: Fix comparison of decimal float zeroes (PR80692) Decimal float negative zero should compare equal to positive zero. Decimal float zeroes are encoded as value class "normal" (in real.c); they need to be handled specially, but in this one case that does not yet happen. This fixes it. PR middle-end/80692 * real.c (do_compare): Give decimal_do_compare preference over comparing just the signs. gcc/testsuite/ PR middle-end/80692 * gcc.c-torture/execute/pr80692.c: New testcase. Added: trunk/gcc/testsuite/gcc.c-torture/execute/pr80692.c Modified: trunk/gcc/ChangeLog trunk/gcc/real.c trunk/gcc/testsuite/ChangeLog