Commit cf9e46fe authored by Russ Cox's avatar Russ Cox

bugs from old gri mail

R=gri
OCL=18093
CL=18093
parent 2f5a05a8
// $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);
}
// $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");
}
}
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment