View Issue Details

IDProjectCategoryView StatusLast Update
0030299RunnerWindows (YYC)Public2019-01-31 10:43
ReporterYellowAfterlifeAssigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
PlatformWindowsOSWindows 10 ProOS Version>=1703
Product VersionInternal Build 
Target Version2.2.2Fixed in Version2.2.2 
Summary0030299: YYC: legacy function calls next to bitwise operators are cast to f64 and then to s64, losing precision
DescriptionGML:
var b = buffer_create(16, buffer_fixed, 1);
var s = "485038903695245323";
var v = int64(s);
show_debug_message(v);
buffer_write(b, buffer_u64, v);
var n = buffer_peek(b, 0, buffer_u64) >> 0; // <- attention here
show_debug_message(n);
assert(n, v);


Output:
485038903695245323
485038903695245312


The culprit in generated code:
local_n=((long long)YYGML_CallLegacyFunction(pSelf,pOther,__ret1__,3,g_FUNC_buffer_peek.val,__pArg33__).asReal() >> (long long)0);


Does not occur if the result is assigned into a temporary variable first.
Tagsyyc
1.4 Found In
2.x Runtime Found In9.9.1.1275
2.x Runtime Verified In2.2.2.302

Activities

YellowAfterlife

2018-12-10 12:18

Developer  

a_bug.yyz (48,137 bytes)

Russell Kay

2018-12-18 15:54

Manager   ~0062295

fixed in gitlab