Odin
Odin copied to clipboard
atomic_load and atomic_store LLVM code generation bug with i128
Report
Odin: dev-2022-05:f27f5955
OS: Windows 10 Unknown Edition (0000007d) (version: 21H2), build 19044.1645
CPU: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
RAM: 8086 MiB
Code
package bug8
import "core:fmt"
import "core:sync"
main :: proc() {
val1: i64
sync.atomic_store(&val1, 1)
sync.atomic_load(&val1)
fmt.println(val1)
val2: i128
sync.atomic_store(&val2, 2)
sync.atomic_load(&val2)
fmt.println(val2)
}
Output
lld-link: error: undefined symbol: __atomic_store referenced by bug8.obj:(bug8.main)
Or
bug8.obj : error LNK2019: unresolved external symbol __atomic_store referenced in function bug8.main
Expected
2
Or
LLVM Error: atomic store operand must have integer, pointer, or floating point type! atomic load operand must have integer, pointer, or floating point type!
This also affects u128
this bug is still present