entry main [n] (xs: [n]i64) =
tabulate n
(\_ -> let xs = scatter (copy xs) xs xs
let xs = xs with [0] = n
in spread xs[0] 0 xs xs :> [n]i64)
Internal compiler error. Please report this:
https://github.com/diku-dk/futhark/issues
Type error after pass 'expand allocations':
In function entry_main
When checking function body
In expression of statement
{ext_mem_6737 : ({}, mem@device),
defunc_2_map_res_6550 : ({}, [n_6369][n_6369]i64 @ ext_mem_6737 -> {base: [n_6369, n_6369]; contiguous: true; LMADs: [{offset: 0i64; strides: [n_6369, 1i64]; shape: [n_6369, n_6369]; permutation: [0, 1]; monotonicity: [Inc, Inc]}]})}
in body of last case
Type error:
Variable scatter_res_r_coalesced_6686 referenced after being consumed.
Compiling program
with backend
openclresults in the error