Skip to content

Records of variable length arrays do not generate valid code #227

@Bastacyclop

Description

@Bastacyclop

Example from #220 (other tests are ignored in this PR for the same reason):

    val e = depFun((n: Nat, m: Nat) => fun(n`.`n`.`m`.`m`.`f32)(in =>
      in |> mapWorkGroup(0)(mapWorkGroup(1)(fun(x =>
        zip(x)(x) |> mapLocal(1)(fun(p =>
          zip(fst(p))(snd(p)) |> mapLocal(0)(fun(p =>
            makePair(fst(p))(snd(p))
          )) |> unzip
        )) |> toLocal |> unzip |> fst |>
        mapLocal(0)(mapLocal(1)(id))
      )))
    ))

Invalid code:

/tmp/code-4209632813176923104.cl:4:14: error: use of undeclared identifier 'n5'
  float _fst[n5];
             ^
/tmp/code-4209632813176923104.cl:5:14: error: use of undeclared identifier 'n5'
  float _snd[n5];
             ^
2 errors generated.
==========
SyntaxChecker failed for code:

struct Record_n5_float_n5_float {
  float _fst[n5];
  float _snd[n5];
};

[...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggenerated codeChanges to the code that our compiler generates

    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