summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatiana Borisova <tatiana.borisova@qt.io>2022-01-20 13:07:00 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-30 03:07:37 +0000
commit487f7119670029ddbcffd1dd31c462e2db78c7b8 (patch)
treebee8f3d916eaa64e4d174ac97a9aa74a67561b30
parentcd7573c1da50f5e10ab6d940754fe583a2ec239a (diff)
Fix tst_qfloat16 run time error for INTEGRITY (tested on sa8115)
- Bounds::has_denorm returns denorm_indeterminate. It is expected behavior for GHS compiler. Task-number: QTBUG-99123 Change-Id: I8402c541093a73623b6dc507012d98e565789cff Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit d336fdd393a8a97fbcb00837763b45602d346d34) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
index 90e131a7ef..ae4c0d05a0 100644
--- a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
+++ b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
@@ -560,7 +560,12 @@ void tst_qfloat16::properties()
QVERIFY(Bounds::has_infinity);
QVERIFY(Bounds::has_quiet_NaN);
QVERIFY(Bounds::has_signaling_NaN);
+#if !defined(Q_CC_GHS)
QCOMPARE(Bounds::has_denorm, std::denorm_present);
+#else
+ // For GHS compiler the "denorm_indeterminite" is the expected return value.
+ QCOMPARE(Bounds::has_denorm, std::denorm_indeterminate);
+#endif // Q_CC_GHS
QCOMPARE(Bounds::round_style, std::round_to_nearest);
QCOMPARE(Bounds::radix, 2);
// Untested: has_denorm_loss