mirror of
https://github.com/vlang/v.git
synced 2025-09-16 16:02:29 +03:00
13 lines
192 B
V
13 lines
192 B
V
@[aligned: 512]
|
|
struct MyStruct {
|
|
a int
|
|
}
|
|
|
|
fn test_struct_aligned() {
|
|
x := u64(voidptr(&MyStruct{}))
|
|
assert x % 512 == 0
|
|
|
|
y := MyStruct{}
|
|
ptr := u64(voidptr(&y))
|
|
assert ptr % 512 == 0
|
|
}
|