summaryrefslogtreecommitdiffstats
path: root/llgo/test/execution/unsafe/sizeof_struct.go
blob: e8612d2ea6cce4f7e153968b8500e7251e410731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: llgo -o %t %s
// RUN: %t 2>&1 | FileCheck %s

// CHECK: 24

package main

import "unsafe"

type a struct {
	a int16
	b int32
	c int8
	d int64
}

func main() {
	println(unsafe.Sizeof(a{}))
}
OpenPOWER on IntegriCloud