Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
ee6b8831
Commit
ee6b8831
authored
Jan 19, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bug246 (issue 492)
R=r CC=golang-dev
https://golang.org/cl/186216
parent
ff6e310b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
bug246.go
test/bugs/bug246.go
+18
-0
golden.out
test/golden.out
+5
-0
No files found.
test/bugs/bug246.go
0 → 100644
View file @
ee6b8831
// $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
)))
}
test/golden.out
View file @
ee6b8831
...
@@ -149,3 +149,8 @@ panic PC=xxx
...
@@ -149,3 +149,8 @@ panic PC=xxx
bad map check 13 false false
bad map check 13 false false
panic PC=xxx
panic PC=xxx
BUG: tuple evaluation order
BUG: tuple evaluation order
=========== bugs/bug246.go
bugs/bug246.go:17: cannot convert 0 to type unsafe.Pointer
bugs/bug246.go:17: cannot convert 0 (type uintptr) to type *int in conversion
BUG: bug246
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment