Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.2.4, 6.3.1, 6.4.0 Beta1
-
c8e43ea02d (qt/tqtc-qmlcompilerplus/6.2) 00af216756 (qt/qtdeclarative/6.3) 00af216756 (qt/tqtc-qtdeclarative/6.3) 6a0ab2e8aa (qt/qtdeclarative/dev) 6a0ab2e8aa (qt/tqtc-qtdeclarative/dev) 2a6dc98540 (qt/qtdeclarative/6.4)
Description
The following generates invalid code:
pragma Strict import QtQml QtObject { function absMinusOne(amount: real) : real { if (amount < 0) amount = -amount; return amount - 1; } property real a: absMinusOne(-5) property real b: absMinusOne(10) }
Produces -6 for property 'a'. In the "amount - 1" expression it doesn't use the register it stores the new amount in, but rather the original argument.
Attachments
Issue Links
- is blocked by
-
QTBUG-104665 Basic blocks pass wrongly optimizes indirect register reads out
- Closed