Commit e5373f27 authored by Robert Griesemer's avatar Robert Griesemer

- added 2 bug tests

SVN=123220
parent ec94a8cf
// 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 f() int {
return 0;
}
func main() {
const n = f(); // should report only one error
}
// $G $D/$F.go && $L $F.$A && ./$A.out
// 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() {
c := 10;
d := 7;
var x [10]int;
i := 0;
/* this works:
q := c/d;
x[i] = q;
*/
// this doesn't:
x[i] = c/d; // BUG segmentation fault
}
...@@ -47,10 +47,10 @@ test0.go:49: illegal types for operand: AS ...@@ -47,10 +47,10 @@ test0.go:49: illegal types for operand: AS
(<float32>FLOAT32) (<float32>FLOAT32)
(<int32>INT32) (<int32>INT32)
test0.go:50: error in shape across assignment test0.go:50: error in shape across assignment
test0.go:55: illegal types for operand: CALLMETH test0.go:47: illegal types for operand: CALLMETH
(*<Point>{}) (*<Point>{})
(<Point>{<x><int32>INT32;<y><int32>INT32;<Point_Initialize>120({},{}){};<Point_Distance>101({},{}){};}) (<Point>{<x><int32>INT32;<y><int32>INT32;<Point_Initialize>120({},{}){};<Point_Distance>101({},{}){};})
test0.go:54: illegal types for operand: AS test0.go:47: illegal types for operand: AS
(<Point>{<x><int32>INT32;<y><int32>INT32;<Point_Initialize>120({},{}){};<Point_Distance>101({},{}){};}) (<Point>{<x><int32>INT32;<y><int32>INT32;<Point_Initialize>120({},{}){};<Point_Distance>101({},{}){};})
({}) ({})
BUG: known to fail incorrectly BUG: known to fail incorrectly
...@@ -139,7 +139,6 @@ BUG: known to succeed incorrectly ...@@ -139,7 +139,6 @@ BUG: known to succeed incorrectly
=========== bugs/bug022.go =========== bugs/bug022.go
bugs/bug022.go:8: illegal types for operand: INDEXPTR bugs/bug022.go:8: illegal types for operand: INDEXPTR
(*<string>*STRING) (*<string>*STRING)
(<int32>INT32)
BUG: known to fail incorrectly BUG: known to fail incorrectly
=========== bugs/bug023.go =========== bugs/bug023.go
...@@ -210,7 +209,7 @@ BUG: compilation should succeed ...@@ -210,7 +209,7 @@ BUG: compilation should succeed
=========== bugs/bug043.go =========== bugs/bug043.go
bugs/bug043.go:14: error in shape across assignment bugs/bug043.go:14: error in shape across assignment
bugs/bug043.go:17: error in shape across assignment bugs/bug043.go:14: error in shape across assignment
BUG: compilation should succeed BUG: compilation should succeed
=========== bugs/bug044.go =========== bugs/bug044.go
...@@ -251,6 +250,23 @@ bugs/bug050.go:3: package statement must be first ...@@ -251,6 +250,23 @@ bugs/bug050.go:3: package statement must be first
sys.6:1 bugs/bug050.go:2: syntax error sys.6:1 bugs/bug050.go:2: syntax error
BUG: segfault BUG: segfault
=========== bugs/bug051.go
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: expression must be a constant
bugs/bug051.go:10: fatal error: too many errors
BUG: infinite loop in error reporting
=========== bugs/bug052.go
BUG: incorrect code for division
=========== fixedbugs/bug000.go =========== fixedbugs/bug000.go
=========== fixedbugs/bug001.go =========== fixedbugs/bug001.go
......
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