From 070446d5ebf2a82531160268fbae0bb7c6730ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 29 Aug 2022 14:58:50 +0200 Subject: [PATCH] tst_qlocale: only restore the fp control masks we change Certain masks are not supported outside 32-bit x86, and will assert on x64. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-106000 Change-Id: Ic9f58e5a19c1db3309edeb5ec529e7a78c929665 Reviewed-by: Thiago Macieira Reviewed-by: Edward Welbourne --- tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp index 5d8ce6b7fd..8c9d0793ff 100644 --- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp @@ -1495,8 +1495,7 @@ void tst_QLocale::fpExceptions() # define _EM_INEXACT 0x00000001 # endif _clearfp(); - unsigned int oldbits = _controlfp(0, 0); - _controlfp( 0 | _EM_INEXACT, _MCW_EM ); + unsigned int oldbits = _controlfp(0 | _EM_INEXACT, _MCW_EM); #endif #ifdef QT_USE_FENV @@ -1514,7 +1513,7 @@ void tst_QLocale::fpExceptions() #ifdef Q_OS_WIN _clearfp(); - _controlfp(oldbits, 0xFFFFF); + _controlfp(oldbits, _MCW_EM); #endif #ifdef QT_USE_FENV