hanchenye-llvm-project/llgo/test/execution/unsafe/const_sizeof.go

19 lines
231 B
Go

// RUN: llgo -o %t %s
// RUN: %t 2>&1 | FileCheck %s
// CHECK: 8
// CHECK-NEXT: 8
package main
import "unsafe"
const ptrSize = unsafe.Sizeof((*byte)(nil))
var x [ptrSize]int
func main() {
println(ptrSize)
println(len(x))
}