diff options
| author | Russ Cox <rsc@golang.org> | 2010-01-18 18:26:10 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-01-18 18:26:10 -0800 |
| commit | ee6b883101d894f4e78a0a40b14ddd7cd35c09a2 (patch) | |
| tree | 73101fe93fa182c7090d0508dd08c057e5fbd8fe /test/bugs | |
| parent | ff6e310b007a9a2addbef70607dfb662c9673d2d (diff) | |
| download | go-ee6b883101d894f4e78a0a40b14ddd7cd35c09a2.tar.xz | |
add bug246 (issue 492)
R=r
CC=golang-dev
https://golang.org/cl/186216
Diffstat (limited to 'test/bugs')
| -rw-r--r-- | test/bugs/bug246.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/bugs/bug246.go b/test/bugs/bug246.go new file mode 100644 index 0000000000..e46cdfd048 --- /dev/null +++ b/test/bugs/bug246.go @@ -0,0 +1,18 @@ +// $G $D/$F.go || echo BUG: bug246 + +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import "unsafe" + +func main() { + // works + addr := uintptr(0) + _ = (*int)(unsafe.Pointer(addr)) + + // fails + _ = (*int)(unsafe.Pointer(uintptr(0))) +} |
