blob: 544e4c52c1bb87f63ade61569a8f7928e55b7370 [file] [log] [blame]
Russ Coxcf9f3802011-06-17 16:12:14 -04001// $G $D/$F.go
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
7package main
8
9import "unsafe"
10
11type T struct {
12 X int
13}
14
15var t T
16
17func isUintptr(uintptr) {}
18
19func main() {
20 isUintptr(unsafe.Sizeof(t))
21 isUintptr(unsafe.Alignof(t))
22 isUintptr(unsafe.Offsetof(t.X))
23}