diff options
author | Ken Thompson <ken@golang.org> | 2009-05-29 15:34:47 -0700 |
---|---|---|
committer | Ken Thompson <ken@golang.org> | 2009-05-29 15:34:47 -0700 |
commit | a195a589d1ed2c2ff0a12faa4fda4f2509344545 (patch) | |
tree | 3dd35f4bb5a0025742b558c0c0a8425ae3e7e605 /test/fixedbugs/bug156.go | |
parent | 345d2ec83d5874375dd9375d432ae8e659955b23 (diff) | |
download | golang-a195a589d1ed2c2ff0a12faa4fda4f2509344545.tar.gz |
bug 156
R=r
OCL=29623
CL=29623
Diffstat (limited to 'test/fixedbugs/bug156.go')
-rw-r--r-- | test/fixedbugs/bug156.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/fixedbugs/bug156.go b/test/fixedbugs/bug156.go new file mode 100644 index 000000000..0b77a72d9 --- /dev/null +++ b/test/fixedbugs/bug156.go @@ -0,0 +1,21 @@ +// $G $D/$F.go || echo BUG: bug156 + +// 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 f(a int64) int64 { + const b int64 = 0; + n := a &^ b; + return n; +} + +func main() { + f(1) +} + +/* +bug156.go:7: constant 18446744073709551615 overflows int64 +*/ |