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
cf9e46fe
Commit
cf9e46fe
authored
Oct 30, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugs from old gri mail
R=gri OCL=18093 CL=18093
parent
2f5a05a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
bug115.go
test/bugs/bug115.go
+14
-0
bug116.go
test/bugs/bug116.go
+34
-0
golden.out
test/golden.out
+16
-0
No files found.
test/bugs/bug115.go
0 → 100644
View file @
cf9e46fe
// $G $D/$F.go || echo BUG: bug115 should compile
// 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
func
isuint
(
i
uint
)
{
}
func
main
()
{
i
:=
^
uint
(
0
);
isuint
(
i
);
}
test/bugs/bug116.go
0 → 100644
View file @
cf9e46fe
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug116
// 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
func
main
()
{
bad
:=
false
;
if
(
-
5
>>
1
)
!=
-
3
{
println
(
"-5>>1 ="
,
-
5
>>
1
,
"want -3"
);
bad
=
true
;
}
if
(
-
4
>>
1
)
!=
-
2
{
println
(
"-4>>1 ="
,
-
4
>>
1
,
"want -2"
);
bad
=
true
;
}
if
(
-
3
>>
1
)
!=
-
2
{
println
(
"-3>>1 ="
,
-
3
>>
1
,
"want -2"
);
bad
=
true
;
}
if
(
-
2
>>
1
)
!=
-
1
{
println
(
"-2>>1 ="
,
-
2
>>
1
,
"want -1"
);
bad
=
true
;
}
if
(
-
1
>>
1
)
!=
-
1
{
println
(
"-1>>1 ="
,
-
1
>>
1
,
"want -1"
);
bad
=
true
;
}
if
bad
{
panicln
(
"errors"
);
}
}
test/golden.out
View file @
cf9e46fe
...
...
@@ -264,3 +264,19 @@ M
=========== fixedbugs/bug103.go
fixedbugs/bug103.go:8: function requires a return type
=========== bugs/bug115.go
bugs/bug115.go:8: overflow converting constant to uint
BUG: bug115 should compile
=========== bugs/bug116.go
-5>>1 = -2 want -3
-4>>1 = -3 want -2
-3>>1 = -1 want -2
-2>>1 = -2 want -1
-1>>1 = 0 want -1
errors
panic on line 92 PC=xxx
BUG: bug116
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