https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93192
Bug ID: 93192 Summary: [m68k] incorrect conversion of inf and nan in __truncxfdf2 Product: gcc Version: 9.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: ad...@tho-otto.de Target Milestone: --- Created attachment 47606 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47606&action=edit Suggested patch The implementation of _truncxfdf2 (long double to double) incorrectly converts INFs and NaNs to very large numbers (8.98847e307). Attached is a suggested patch. It also fixes the test case for a zero exponent, which in the current version also tests the empty 16 bits of the long double format for being zero, but should ignore them.