aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-11-09 16:06:56 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2016-11-11 06:18:01 +0000
commit2a992040e2ef3f9dab087be3bfac05e28596672b (patch)
treed212f73f9ff82f8770ee2df8c473724c20bfd7c9
parent53eb106129a931625c9f06ac5d3f7fd6fa20a225 (diff)
Fix more cases where DSE would optimize out too many storesv5.7.1
GCC5/6 do aggressive dead store elimination on memory passed to placement-new. This resulted in the Heap::Object::prototype being a nullptr. qml.pro already contained the -fno-lifetime-dse flag, but there are other places where we ask the memory manager to allocate data. This is temporary band-aid, and is already fixed in 5.8. Change-Id: Ia61a69f65fab351068a588cfc36b5b3d762ffc9f Task-number: QTBUG-56932 (cherry picked from commit f4ac007f4a19bc095ff15d415a6629986de78e49) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/imports/particles/particles.pro5
-rw-r--r--src/quick/quick.pro5
-rw-r--r--tests/auto/qml/qqmlecmascript/qqmlecmascript.pro5
3 files changed, 15 insertions, 0 deletions
diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro
index 4460d03a04..fb9626c40e 100644
--- a/src/imports/particles/particles.pro
+++ b/src/imports/particles/particles.pro
@@ -3,6 +3,11 @@ TARGET = particlesplugin
TARGETPATH = QtQuick/Particles.2
IMPORT_VERSION = 2.0
+greaterThan(QT_GCC_MAJOR_VERSION, 5) {
+ # Our code is bad. Temporary workaround. Fixed in 5.8
+ QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
+}
+
SOURCES += \
plugin.cpp
diff --git a/src/quick/quick.pro b/src/quick/quick.pro
index 1c14ff8d57..f56fb2e081 100644
--- a/src/quick/quick.pro
+++ b/src/quick/quick.pro
@@ -13,6 +13,11 @@ exists("qqml_enable_gcov") {
LIBS_PRIVATE += -lgcov
}
+greaterThan(QT_GCC_MAJOR_VERSION, 5) {
+ # Our code is bad. Temporary workaround. Fixed in 5.8
+ QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
+}
+
QMAKE_DOCS = $$PWD/doc/qtquick.qdocconf
ANDROID_LIB_DEPENDENCIES = \
diff --git a/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro
index 101181bba0..684e7adb98 100644
--- a/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro
+++ b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro
@@ -13,6 +13,11 @@ RESOURCES += qqmlecmascript.qrc
include (../../shared/util.pri)
+greaterThan(QT_GCC_MAJOR_VERSION, 5) {
+ # Our code is bad. Temporary workaround. Fixed in 5.8
+ QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
+}
+
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov