mirror of
https://github.com/golang/go
synced 2024-11-11 21:20:21 -07:00
- added 2 bug tests
SVN=123220
This commit is contained in:
parent
ec94a8cfc9
commit
e5373f27d0
15
test/bugs/bug051.go
Normal file
15
test/bugs/bug051.go
Normal file
@ -0,0 +1,15 @@
|
||||
// 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
|
||||
}
|
20
test/bugs/bug052.go
Normal file
20
test/bugs/bug052.go
Normal file
@ -0,0 +1,20 @@
|
||||
// $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
|
||||
(<float32>FLOAT32)
|
||||
(<int32>INT32)
|
||||
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>{<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({},{}){};})
|
||||
({})
|
||||
BUG: known to fail incorrectly
|
||||
@ -139,7 +139,6 @@ BUG: known to succeed incorrectly
|
||||
=========== bugs/bug022.go
|
||||
bugs/bug022.go:8: illegal types for operand: INDEXPTR
|
||||
(*<string>*STRING)
|
||||
(<int32>INT32)
|
||||
BUG: known to fail incorrectly
|
||||
|
||||
=========== bugs/bug023.go
|
||||
@ -210,7 +209,7 @@ BUG: compilation should succeed
|
||||
|
||||
=========== bugs/bug043.go
|
||||
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
|
||||
|
||||
=========== bugs/bug044.go
|
||||
@ -251,6 +250,23 @@ bugs/bug050.go:3: package statement must be first
|
||||
sys.6:1 bugs/bug050.go:2: syntax error
|
||||
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/bug001.go
|
||||
|
Loading…
Reference in New Issue
Block a user