You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
u256[1] a = { 0 };
export
fn main() -> reg u256 {
reg ptr u256[1] p;
p = a;
reg u64 i;
i = 0;
reg u256 x;
x = p[i];
return x;
}
gives compilation error in function main: asmgen: invalid scale
which is a bit confusing until you remember that i is being scaled by 32. If we access the array instead of a pointer, we get a beautiful compilation error in function main: asmgen: Invalid global address : (RIP +64u ((((64u) 32) *64u RAX) +64u ((64u) 0))) where we see the 32.
Can we print the invalid scale in the error?
The text was updated successfully, but these errors were encountered:
The following code
gives
compilation error in function main: asmgen: invalid scale
which is a bit confusing until you remember that
i
is being scaled by 32. If we access the array instead of a pointer, we get a beautifulcompilation error in function main: asmgen: Invalid global address : (RIP +64u ((((64u) 32) *64u RAX) +64u ((64u) 0)))
where we see the 32.Can we print the invalid scale in the error?
The text was updated successfully, but these errors were encountered: