Skip to content

Possibly spurious error: LLVM ERROR: Coroutines cannot handle non static allocas yet #421

@justinclift

Description

@justinclift

Came across an interesting LLVM ERROR while adjusting the repulsion demo to use JS timers instead of Go created callbacks.

$ tinygo build -target wasm -gc conservative -no-debug -o html/test.wasm canvas/main.go
LLVM ERROR: Coroutines cannot handle non static allocas yet

Instead of this being a cut-n-dried case of something being wrong with the code, this is turning up after working code (that compiles fine) has a non-useful part commented out. eg there's no functional change to the code. No change in what touches globals, etc.

Seems like something isn't quite right yet. 😉

The full code (compiles ok): https://github.com/justinclift/wasm-experiments/blob/88ef10af6523556786f8bc44b1aea86ce2c198be/canvas/main.go

The code section to comment out, to trigger this problem: https://github.com/justinclift/wasm-experiments/blob/88ef10af6523556786f8bc44b1aea86ce2c198be/canvas/main.go#L46-L56

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions