aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4ssa.cpp
diff options
context:
space:
mode:
authorPelle Johnsen <pelle.johnsen@gmail.com>2014-08-20 12:06:10 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-08-25 22:54:41 +0200
commit81975f5fe72d4e19b36d397248d96d3e86cd13e9 (patch)
treeae6a560ddb6be7e95b2d6a71621ed4345837fd59 /src/qml/compiler/qv4ssa.cpp
parentcae7176827eb3c23428cfcd8f6dabb00f8dcaef3 (diff)
Fix QML2 hang on gcc 4.6.3 armhf
With gcc 4.6.3 armhf (defualt for Ubuntu 12.04) some optimization bug results in QML2 v4 compiler hang during type inference. Task-number: QTBUG-40364 Change-Id: Iea1a8be3b5a7d9410304110d89dae3735339cb72 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r--src/qml/compiler/qv4ssa.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 7ea128d6ea..774d8fb88c 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -2212,10 +2212,14 @@ class TypeInference: public StmtVisitor, public ExprVisitor
DiscoveredType type;
bool fullyTyped;
- TypingResult(const DiscoveredType &type = DiscoveredType())
- : type(type)
- , fullyTyped(type.type != UnknownType)
- {}
+ TypingResult(const DiscoveredType &type = DiscoveredType()) {
+#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 6
+ // avoid optimization bug in gcc 4.6.3 armhf
+ ((int volatile &) this->type.type) = type.type;
+#endif
+ this->type = type;
+ fullyTyped = type.type != UnknownType;
+ }
explicit TypingResult(MemberExpressionResolver memberResolver)
: type(memberResolver)
, fullyTyped(true)