qt6-bb10/tests/auto/gui/painting
Matthias Rauter 1909435b03 Work around compiler bug in QTransform
gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4) seems to remove some
code in release builds that is embedded in a macro in qtransfrom.cpp.
This patch changes the macro into a function such that it is not
removed by gcc.

It seems like the switch statement is (wrongly) optimized away if it is
embedded in the QTransform::map(QPolygonF) overload. nx and ny are
always 0 (as initialized by QPolygonF) after the macro (but only within
the QTransform::map(QPolygonF) function.

The bug happens only in a release build. Added debug messages of nx and
ny created no output, adding qDebug() << t, which made the macro work.

It seems that a complex combination of macro and switch statement can
tigger the bug in gcc. So rewriting the macro as a function works around
the bug.

Fixes: QTBUG-127723
Change-Id: I7e0b02cde276e591cf773f4e18dd505134421957
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 11b70b66de627d3bd0ef4193d5cfa624c88ac96a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 17:03:57 +00:00
..
qbrush Change license for tests files 2024-02-04 09:56:42 +01:00
qcolor Remove extra semi-colons 2024-02-06 20:17:18 +09:00
qcolorspace Fix HDR transfer function image conversions 2024-06-14 00:41:03 +00:00
qcolortransform Fix build with gcc-14 2024-02-14 00:25:55 +00:00
qpagelayout print: Clamp margins entered by the user in the page setup dialog 2024-04-25 14:22:30 +03:00
qpageranges Change license for tests files 2024-02-04 09:56:42 +01:00
qpagesize Change license for tests files 2024-02-04 09:56:42 +01:00
qpaintengine Change license for tests files 2024-02-04 09:56:42 +01:00
qpainter Port QImage::Format_CMYK32 to CMYK8888 2024-04-04 16:08:22 +01:00
qpainterpath QPainterPath: detach and reset before streaming in 2024-02-27 03:47:11 +01:00
qpainterpathstroker Change license for tests files 2024-02-04 09:56:42 +01:00
qpathclipper Remove extra semi-colons 2024-02-06 20:17:18 +09:00
qpdfwriter Change license for tests files 2024-02-04 09:56:42 +01:00
qpen Change license for tests files 2024-02-04 09:56:42 +01:00
qpolygon Change license for tests files 2024-02-04 09:56:42 +01:00
qregion QRegion: re-add rects() and port setRects() to QSpan 2024-05-24 04:38:21 +00:00
qtransform Work around compiler bug in QTransform 2024-08-25 17:03:57 +00:00
qwmatrix Get rid of QMatrix 2020-02-28 08:57:57 +01:00
CMakeLists.txt Fix build without PDF 2024-02-25 21:40:47 +00:00