v2 / vlib / v / tests / tcc_arm64_atomic_fence_test.v
16 lines · 13 sloc · 239 bytes · 8018dde3ea6cb7bf0b3a3c3f08cd893511e92ca2
Raw
1// vtest build: tinyc && arm64
2// vtest vflags: -cc tcc -no-retry-compilation
3module main
4
5fn test_tcc_arm64_atomic_fence() {
6 a := 1
7
8 b := fn [a] () int {
9 println(a)
10 return a
11 }
12
13 g := spawn b()
14 ret := g.wait()
15 println(ret) // 1
16}
17