Skip to content

Internal compiler error: Type error after pass 'expand allocations' #1837

Description

@nbos

Compiling program

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)

with backend opencl results in the error

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions