blob: 59921d41caba14ef4bb1655f5bf4a13b166ebd12 [file] [log] [blame]
Russ Cox80803842012-02-16 23:49:59 -05001// run
Russ Cox3f335f82011-05-10 17:00:15 -04002
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// Issue 1608.
8// Size used to be -1000000000.
9
10package main
11
12import "unsafe"
13
14func main() {
15 var a interface{} = 0
16 size := unsafe.Sizeof(a)
17 if size != 2*unsafe.Sizeof((*int)(nil)) {
18 println("wrong size: ", size)
19 }
20}