https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97653
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Without -mabilongdouble the result is correct. If configured with --with-long-double-format=ibm the result is correct with any -mabi option.