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

// CHECK: 12

package main

import "unsafe"

type uint24 struct {
	a uint16
	b uint8
}

func main() {
	var a [3]uint24
	println(unsafe.Sizeof(a))
}
OpenPOWER on IntegriCloud