Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.1, 5.3.1
-
None
-
$ cat /proc/cpuinfo
Processor : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 583.68
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x1
CPU part : 0xc08
CPU revision : 3
$ arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3$ cat /proc/cpuinfo Processor : ARMv7 Processor rev 3 (v7l) BogoMIPS : 583.68 Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x1 CPU part : 0xc08 CPU revision : 3 $ arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
-
81975f5fe72d4e19b36d397248d96d3e86cd13e9 (qtdeclarative)
Description
When building Qt with gcc 4.6.3 (the default in Ubuntu 12.04) for armhf, some optimizations go wrong and QML2's v4 compiler hangs during type inference. This was working with 5.2.0.
After many hours debugging I made following 'work around':
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 97114b9..567a8c1 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -1880,7 +1880,11 @@ 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()) { + // avoid optimization bug in gcc 4.6.3 armhf + ((int volatile &) this->type.type) = type.type; + fullyTyped = type.type != UnknownType; + } explicit TypingResult(MemberExpressionResolver memberResolver): type(memberResolver), fullyTyped(true) {} }; TypingResult _ty;
Not sure if this makes sense to include in master, but thought it would at least be good to record it here if others run into same issue