Open eponier opened 4 weeks ago
I tested whether we could access and assign subarrays of stkptr, and it appears that it is accepted by stack alloc, but fails at linearization.
param int N = 4; // we want to do pointer arithmetic with stk ptr, but this fails export fn main (reg ptr u64[N] r) -> reg u64 { reg u64 res = 0; stack ptr u64[N] s; stack ptr u64[1] s1; reg ptr u64[1] r1; s = r; s1 = s[1:1]; r1 = s1; res = r1[0]; return res; }
Do we want to allow such a thing?
(it probably makes sense only on x86, but I think it does make sense there)
I tested whether we could access and assign subarrays of stkptr, and it appears that it is accepted by stack alloc, but fails at linearization.
Do we want to allow such a thing?