1// compile
2
3// Copyright 2011 The Go Authors.  All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7// Test unsafe.Sizeof, unsafe.Alignof, and unsafe.Offsetof all return uintptr.
8
9package main
10
11import "unsafe"
12
13type T struct {
14	X int
15}
16
17var t T
18
19func isUintptr(uintptr) {}
20
21func main() {
22	isUintptr(unsafe.Sizeof(t))
23	isUintptr(unsafe.Alignof(t))
24	isUintptr(unsafe.Offsetof(t.X))
25}
26