]> Cypherpunks repositories - gostls13.git/commitdiff
- added 2 bugs tests
authorRobert Griesemer <gri@golang.org>
Fri, 18 Jul 2008 19:26:48 +0000 (12:26 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 18 Jul 2008 19:26:48 +0000 (12:26 -0700)
SVN=128056

test/bugs/bug072.go [new file with mode: 0644]
test/bugs/bug073.go [new file with mode: 0644]
test/fixedbugs/bug071.go [moved from test/bugs/bug071.go with 100% similarity]
test/golden.out

diff --git a/test/bugs/bug072.go b/test/bugs/bug072.go
new file mode 100644 (file)
index 0000000..f711790
--- /dev/null
@@ -0,0 +1,11 @@
+// errchk $G $D/$F.go
+
+// 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() {
+       s := string(bug);  // crash
+}
diff --git a/test/bugs/bug073.go b/test/bugs/bug073.go
new file mode 100644 (file)
index 0000000..e7a0843
--- /dev/null
@@ -0,0 +1,14 @@
+// errchk $G $D/$F.go
+
+// 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() {
+       var s int = 0;
+       var x int = 0;
+       x = x << s;  // should complain that s is not a uint
+       x = x >> s;  // should complain that s is not a uint
+}
similarity index 100%
rename from test/bugs/bug071.go
rename to test/fixedbugs/bug071.go
index 37d76cdcae78a743dd77b32375957d6e67f6be0e..746175239f2f15ad39dd8bb5b7080247159fe2be 100644 (file)
@@ -192,15 +192,6 @@ enqueue: main·.stringo: not defined
 BUG: link failure
 
 =========== bugs/bug052.go
-SIGSEGV: segmentation violation
-Faulting address: 0x1
-pc: 0x1346
-
-0x1346?zi
-       main·main(1, 0, 1606414968, ...)
-       main·main(0x1, 0x7fff5fbff278, 0x0, ...)
-
-BUG: incorrect code for division
 
 =========== bugs/bug053.go
 bugs/bug053.go:6: syntax error
@@ -249,7 +240,6 @@ bugs/bug064.go:15: illegal types for operand: CALL
 BUG: compilation should succeed
 
 =========== bugs/bug066.go
-BUG: compilation should succeed
 
 =========== bugs/bug067.go
 
@@ -265,12 +255,14 @@ outer loop top k 1
 k not zero
 panic on line 271 PC=0x1362
 0x1362?zi
-       main·main(1, 0, 1606414960, ...)
-       main·main(0x1, 0x7fff5fbff270, 0x0, ...)
+       main·main(1, 0, 1606416424, ...)
+       main·main(0x1, 0x7fff5fbff828, 0x0, ...)
 BUG: crashes
 
-=========== bugs/bug071.go
-BUG: compiler crashes
+=========== bugs/bug072.go
+
+=========== bugs/bug073.go
+BUG: should not compile
 
 =========== fixedbugs/bug000.go
 
@@ -364,3 +356,5 @@ fixedbugs/bug051.go:10: expression must be a constant
 =========== fixedbugs/bug065.go
 
 =========== fixedbugs/bug069.go
+
+=========== fixedbugs/bug071.go