summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2013-12-12 17:18:12 -0800
committerIan Lance Taylor <iant@golang.org>2013-12-12 17:18:12 -0800
commit8e7a2ed2095cfd56adf9443b8473e9386dc3fb22 (patch)
tree215c703ce6162e1be9778d810d88122beebf807b /test
parent6161d94e122c458b55be63556c01b8d664623636 (diff)
downloadgo-8e7a2ed2095cfd56adf9443b8473e9386dc3fb22.tar.gz
test: match gccgo error messages
const1.go:33: error: integer constant overflow <similar errors omitted> const1.go:64: error: division by zero const1.go:67: error: floating point constant overflow const1.go:68: error: floating point constant overflow const1.go:69: error: floating point constant overflow const1.go:70: error: division by zero const1.go:71: error: expected integer type const1.go:77: error: argument 1 has incompatible type (cannot use type int8 as type int) const1.go:78: error: argument 1 has incompatible type (cannot use type int8 as type int) const1.go:79: error: argument 1 has incompatible type (cannot use type uint8 as type int) const1.go:81: error: argument 1 has incompatible type (cannot use type float32 as type int) const1.go:82: error: argument 1 has incompatible type (cannot use type float64 as type int) const1.go:83: error: floating point constant truncated to integer const1.go:85: error: argument 1 has incompatible type (cannot use type float64 as type int) const1.go:86: error: argument 1 has incompatible type (cannot use type string as type int) const1.go:87: error: argument 1 has incompatible type (cannot use type bool as type int) const1.go:90: error: const initializer cannot be nil const1.go:91: error: expression is not constant const1.go:92: error: expression is not constant const1.go:93: error: invalid constant type const1.go:94: error: invalid constant type fixedbugs/bug462.go:17: error: unknown field 'os.File' in 'T' fixedbugs/issue3705.go:9: error: cannot declare init - must be func fixedbugs/issue4251.go:12: error: inverted slice range fixedbugs/issue4251.go:16: error: inverted slice range fixedbugs/issue4251.go:20: error: inverted slice range fixedbugs/issue4405.go:11: error: invalid character 0x7 in identifier fixedbugs/issue4405.go:12: error: invalid character 0x8 in identifier fixedbugs/issue4405.go:13: error: invalid character 0xb in identifier fixedbugs/issue4405.go:14: error: invalid character 0xc in identifier fixedbugs/issue4429.go:15: error: expected pointer fixedbugs/issue4517d.go:9: error: cannot import package as init fixedbugs/issue4545.go:17: error: invalid context-determined non-integer type for left operand of shift fixedbugs/issue4545.go:16: error: incompatible types in binary expression fixedbugs/issue4610.go:15: error: expected ';' or '}' or newline fixedbugs/issue4610.go:16: error: expected declaration fixedbugs/issue4654.go:15: error: value computed is not used <similar errors omitted> fixedbugs/issue4776.go:9: error: program must start with package clause fixedbugs/issue4776.go:9: error: expected ';' or newline after package clause fixedbugs/issue4813.go:31: error: index must be integer <similar errors omitted> fixedbugs/issue4847.go:22: error: initialization expression for 'matchAny' depends upon itself fixedbugs/issue5089.go:13: error: redefinition of 'bufio.Buffered': receiver name changed fixedbugs/issue5089.go:11: note: previous definition of 'bufio.Buffered' was here fixedbugs/issue5172.go:17: error: reference to undefined field or method 'bar' fixedbugs/issue5172.go:18: error: reference to undefined field or method 'bar' fixedbugs/issue5172.go:12: error: use of undefined type 'bar' fixedbugs/issue5358.go:16: error: argument 2 has incompatible type fixedbugs/issue5581.go:29: error: use of undefined type 'Blah' funcdup.go:10: error: redefinition of 'i' funcdup.go:10: note: previous definition of 'i' was here <similar errors omitted> funcdup2.go:10: error: redefinition of 'i' funcdup2.go:10: note: previous definition of 'i' was here <similar errors omitted> slice3err.go:20: error: middle index required in 3-index slice <similar errors omitted> slice3err.go:20: error: final index required in 3-index slice <similar errors omitted> slice3err.go:21: error: final index required in 3-index slice slice3err.go:46: error: invalid 3-index slice of string <similar errors omitted> slice3err.go:57: error: inverted slice range <similar errors omitted> slice3err.go:62: error: invalid slice index: capacity less than length slice3err.go:64: error: invalid slice index: capacity less than start slice3err.go:65: error: invalid slice index: capacity less than start slice3err.go:66: error: invalid slice index: capacity less than start slice3err.go:68: error: invalid slice index: capacity less than length slice3err.go:70: error: invalid slice index: capacity less than start slice3err.go:80: error: invalid slice index: capacity less than length slice3err.go:82: error: invalid slice index: capacity less than start slice3err.go:83: error: invalid slice index: capacity less than start slice3err.go:84: error: invalid slice index: capacity less than start slice3err.go:86: error: invalid slice index: capacity less than length slice3err.go:88: error: invalid slice index: capacity less than start slice3err.go:99: error: array index out of bounds <similar errors omitted> slice3err.go:106: error: invalid slice index: capacity less than length slice3err.go:107: error: invalid slice index: capacity less than start slice3err.go:118: error: invalid slice index: capacity less than length slice3err.go:119: error: invalid slice index: capacity less than start syntax/semi1.go:10: error: missing '{' after if clause syntax/semi1.go:10: error: reference to undefined name 'x' syntax/semi1.go:10: error: reference to undefined name 'y' syntax/semi1.go:12: error: reference to undefined name 'z' syntax/semi2.go:10: error: missing '{' after switch clause syntax/semi2.go:10: error: reference to undefined name 'x' syntax/semi3.go:10: error: missing '{' after for clause syntax/semi3.go:10: error: reference to undefined name 'x' syntax/semi3.go:10: error: reference to undefined name 'y' syntax/semi3.go:10: error: reference to undefined name 'z' syntax/semi3.go:12: error: reference to undefined name 'z' syntax/semi4.go:11: error: missing '{' after for clause syntax/semi4.go:10: error: reference to undefined name 'x' syntax/semi4.go:12: error: reference to undefined name 'z' typecheck.go:12: error: reference to undefined name 'b' typecheck.go:17: error: reference to undefined name 'c' typecheck.go:11: error: use of undefined type 'b' typecheck.go:16: error: not enough arguments typecheck.go:17: error: not enough arguments R=golang-dev, rsc CC=golang-dev https://codereview.appspot.com/41520044
Diffstat (limited to 'test')
-rw-r--r--test/const1.go8
-rw-r--r--test/fixedbugs/bug462.go2
-rw-r--r--test/fixedbugs/issue3705.go2
-rw-r--r--test/fixedbugs/issue4251.go6
-rw-r--r--test/fixedbugs/issue4405.go8
-rw-r--r--test/fixedbugs/issue4429.go2
-rw-r--r--test/fixedbugs/issue4517d.go2
-rw-r--r--test/fixedbugs/issue4545.go2
-rw-r--r--test/fixedbugs/issue4610.go4
-rw-r--r--test/fixedbugs/issue4654.go44
-rw-r--r--test/fixedbugs/issue4776.go2
-rw-r--r--test/fixedbugs/issue4813.go12
-rw-r--r--test/fixedbugs/issue4847.go2
-rw-r--r--test/fixedbugs/issue5089.go4
-rw-r--r--test/fixedbugs/issue5172.go4
-rw-r--r--test/fixedbugs/issue5358.go2
-rw-r--r--test/fixedbugs/issue5581.go2
-rw-r--r--test/funcdup.go24
-rw-r--r--test/funcdup2.go12
-rw-r--r--test/slice3err.go56
-rw-r--r--test/syntax/semi1.go2
-rw-r--r--test/syntax/semi2.go2
-rw-r--r--test/syntax/semi3.go2
-rw-r--r--test/syntax/semi4.go2
-rw-r--r--test/typecheck.go4
25 files changed, 106 insertions, 106 deletions
diff --git a/test/const1.go b/test/const1.go
index a170ce9e7..58bddee7e 100644
--- a/test/const1.go
+++ b/test/const1.go
@@ -88,7 +88,7 @@ func main() {
}
const ptr = nil // ERROR "const.*nil"
-const _ = string([]byte(nil)) // ERROR "is not a constant"
-const _ = uintptr(unsafe.Pointer((*int)(nil))) // ERROR "is not a constant"
-const _ = unsafe.Pointer((*int)(nil)) // ERROR "cannot be nil"
-const _ = (*int)(nil) // ERROR "cannot be nil"
+const _ = string([]byte(nil)) // ERROR "is not a? ?constant"
+const _ = uintptr(unsafe.Pointer((*int)(nil))) // ERROR "is not a? ?constant"
+const _ = unsafe.Pointer((*int)(nil)) // ERROR "cannot be nil|invalid constant type"
+const _ = (*int)(nil) // ERROR "cannot be nil|invalid constant type"
diff --git a/test/fixedbugs/bug462.go b/test/fixedbugs/bug462.go
index 6434255c8..1a23ad064 100644
--- a/test/fixedbugs/bug462.go
+++ b/test/fixedbugs/bug462.go
@@ -14,6 +14,6 @@ type T struct {
func main() {
_ = T {
- os.File: 1, // ERROR "unknown T field"
+ os.File: 1, // ERROR "unknown T? ?field"
}
}
diff --git a/test/fixedbugs/issue3705.go b/test/fixedbugs/issue3705.go
index c19bcea1c..64ef38b10 100644
--- a/test/fixedbugs/issue3705.go
+++ b/test/fixedbugs/issue3705.go
@@ -6,4 +6,4 @@
package p
-func init() // ERROR "missing function body"
+func init() // ERROR "missing function body|cannot declare init"
diff --git a/test/fixedbugs/issue4251.go b/test/fixedbugs/issue4251.go
index 4adec2bab..3668d4c89 100644
--- a/test/fixedbugs/issue4251.go
+++ b/test/fixedbugs/issue4251.go
@@ -9,13 +9,13 @@
package p
func F1(s []byte) []byte {
- return s[2:1] // ERROR "invalid slice index"
+ return s[2:1] // ERROR "invalid slice index|inverted slice range"
}
func F2(a [10]byte) []byte {
- return a[2:1] // ERROR "invalid slice index"
+ return a[2:1] // ERROR "invalid slice index|inverted slice range"
}
func F3(s string) string {
- return s[2:1] // ERROR "invalid slice index"
+ return s[2:1] // ERROR "invalid slice index|inverted slice range"
}
diff --git a/test/fixedbugs/issue4405.go b/test/fixedbugs/issue4405.go
index c0d808559..b8458d776 100644
--- a/test/fixedbugs/issue4405.go
+++ b/test/fixedbugs/issue4405.go
@@ -8,8 +8,8 @@ package p
const (
_ = iota
- _ // ERROR "illegal character"
- _ // ERROR "illegal character"
- _ // ERROR "illegal character"
- _ // ERROR "illegal character"
+ _ // ERROR "illegal character|invalid character"
+ _ // ERROR "illegal character|invalid character"
+ _ // ERROR "illegal character|invalid character"
+ _ // ERROR "illegal character|invalid character"
)
diff --git a/test/fixedbugs/issue4429.go b/test/fixedbugs/issue4429.go
index 8a93b0204..6822760ef 100644
--- a/test/fixedbugs/issue4429.go
+++ b/test/fixedbugs/issue4429.go
@@ -12,5 +12,5 @@ type a struct {
func main() {
av := a{};
- *a(av); // ERROR "invalid indirect"
+ _ = *a(av); // ERROR "invalid indirect|expected pointer"
}
diff --git a/test/fixedbugs/issue4517d.go b/test/fixedbugs/issue4517d.go
index f601db66f..3d727d433 100644
--- a/test/fixedbugs/issue4517d.go
+++ b/test/fixedbugs/issue4517d.go
@@ -6,4 +6,4 @@
package p
-import init "fmt" // ERROR "cannot import package as init - init must be a func"
+import init "fmt" // ERROR "cannot import package as init"
diff --git a/test/fixedbugs/issue4545.go b/test/fixedbugs/issue4545.go
index 501caadb0..c37ccef7c 100644
--- a/test/fixedbugs/issue4545.go
+++ b/test/fixedbugs/issue4545.go
@@ -13,7 +13,7 @@ import "fmt"
func main() {
var s uint
- fmt.Println(1.0 + 1<<s) // ERROR "invalid operation|non-integer type"
+ fmt.Println(1.0 + 1<<s) // ERROR "invalid operation|non-integer type|incompatible type"
x := 1.0 + 1<<s // ERROR "invalid operation|non-integer type"
_ = x
}
diff --git a/test/fixedbugs/issue4610.go b/test/fixedbugs/issue4610.go
index bc6bfe790..d56c6d3e8 100644
--- a/test/fixedbugs/issue4610.go
+++ b/test/fixedbugs/issue4610.go
@@ -12,6 +12,6 @@ type bar struct {
func main() {
var foo bar
- _ = &foo{} // ERROR "is not a type"
-}
+ _ = &foo{} // ERROR "is not a type|expected .;."
+} // GCCGO_ERROR "expected declaration"
diff --git a/test/fixedbugs/issue4654.go b/test/fixedbugs/issue4654.go
index 170594e4b..d3f582b20 100644
--- a/test/fixedbugs/issue4654.go
+++ b/test/fixedbugs/issue4654.go
@@ -12,32 +12,32 @@ package p
import "unsafe"
func f() {
- defer int(0) // ERROR "defer requires function call, not conversion"
- go string([]byte("abc")) // ERROR "go requires function call, not conversion"
+ defer int(0) // ERROR "defer requires function call, not conversion|is not used"
+ go string([]byte("abc")) // ERROR "go requires function call, not conversion|is not used"
var c complex128
var f float64
var t struct {X int}
var x []int
- defer append(x, 1) // ERROR "defer discards result of append"
- defer cap(x) // ERROR "defer discards result of cap"
- defer complex(1, 2) // ERROR "defer discards result of complex"
- defer complex(f, 1) // ERROR "defer discards result of complex"
- defer imag(1i) // ERROR "defer discards result of imag"
- defer imag(c) // ERROR "defer discards result of imag"
- defer len(x) // ERROR "defer discards result of len"
- defer make([]int, 1) // ERROR "defer discards result of make"
- defer make(chan bool) // ERROR "defer discards result of make"
- defer make(map[string]int) // ERROR "defer discards result of make"
- defer new(int) // ERROR "defer discards result of new"
- defer real(1i) // ERROR "defer discards result of real"
- defer real(c) // ERROR "defer discards result of real"
- defer append(x, 1) // ERROR "defer discards result of append"
- defer append(x, 1) // ERROR "defer discards result of append"
- defer unsafe.Alignof(t.X) // ERROR "defer discards result of unsafe.Alignof"
- defer unsafe.Offsetof(t.X) // ERROR "defer discards result of unsafe.Offsetof"
- defer unsafe.Sizeof(t) // ERROR "defer discards result of unsafe.Sizeof"
+ defer append(x, 1) // ERROR "defer discards result of append|is not used"
+ defer cap(x) // ERROR "defer discards result of cap|is not used"
+ defer complex(1, 2) // ERROR "defer discards result of complex|is not used"
+ defer complex(f, 1) // ERROR "defer discards result of complex|is not used"
+ defer imag(1i) // ERROR "defer discards result of imag|is not used"
+ defer imag(c) // ERROR "defer discards result of imag|is not used"
+ defer len(x) // ERROR "defer discards result of len|is not used"
+ defer make([]int, 1) // ERROR "defer discards result of make|is not used"
+ defer make(chan bool) // ERROR "defer discards result of make|is not used"
+ defer make(map[string]int) // ERROR "defer discards result of make|is not used"
+ defer new(int) // ERROR "defer discards result of new|is not used"
+ defer real(1i) // ERROR "defer discards result of real|is not used"
+ defer real(c) // ERROR "defer discards result of real|is not used"
+ defer append(x, 1) // ERROR "defer discards result of append|is not used"
+ defer append(x, 1) // ERROR "defer discards result of append|is not used"
+ defer unsafe.Alignof(t.X) // ERROR "defer discards result of unsafe.Alignof|is not used"
+ defer unsafe.Offsetof(t.X) // ERROR "defer discards result of unsafe.Offsetof|is not used"
+ defer unsafe.Sizeof(t) // ERROR "defer discards result of unsafe.Sizeof|is not used"
defer copy(x, x) // ok
m := make(map[int]int)
@@ -47,8 +47,8 @@ func f() {
defer println(1) // ok
defer recover() // ok
- int(0) // ERROR "int\(0\) evaluated but not used"
- string([]byte("abc")) // ERROR "string\(.*\) evaluated but not used"
+ int(0) // ERROR "int\(0\) evaluated but not used|is not used"
+ string([]byte("abc")) // ERROR "string\(.*\) evaluated but not used|is not used"
append(x, 1) // ERROR "not used"
cap(x) // ERROR "not used"
diff --git a/test/fixedbugs/issue4776.go b/test/fixedbugs/issue4776.go
index c38dc09b1..13781af1f 100644
--- a/test/fixedbugs/issue4776.go
+++ b/test/fixedbugs/issue4776.go
@@ -6,5 +6,5 @@
// Issue 4776: missing package declaration error should be fatal.
-type MyInt int32 // ERROR "package statement must be first"
+type MyInt int32 // ERROR "package statement must be first|package clause"
diff --git a/test/fixedbugs/issue4813.go b/test/fixedbugs/issue4813.go
index 20dc58795..f560b2fac 100644
--- a/test/fixedbugs/issue4813.go
+++ b/test/fixedbugs/issue4813.go
@@ -28,25 +28,25 @@ var (
var (
a1 = A[i]
a2 = A[f]
- a3 = A[f2] // ERROR "truncated"
+ a3 = A[f2] // ERROR "truncated|must be integer"
a4 = A[c]
- a5 = A[c2] // ERROR "truncated"
+ a5 = A[c2] // ERROR "truncated|must be integer"
a6 = A[vf] // ERROR "non-integer|must be integer"
a7 = A[vc] // ERROR "non-integer|must be integer"
s1 = S[i]
s2 = S[f]
- s3 = S[f2] // ERROR "truncated"
+ s3 = S[f2] // ERROR "truncated|must be integer"
s4 = S[c]
- s5 = S[c2] // ERROR "truncated"
+ s5 = S[c2] // ERROR "truncated|must be integer"
s6 = S[vf] // ERROR "non-integer|must be integer"
s7 = S[vc] // ERROR "non-integer|must be integer"
t1 = T[i]
t2 = T[f]
- t3 = T[f2] // ERROR "truncated"
+ t3 = T[f2] // ERROR "truncated|must be integer"
t4 = T[c]
- t5 = T[c2] // ERROR "truncated"
+ t5 = T[c2] // ERROR "truncated|must be integer"
t6 = T[vf] // ERROR "non-integer|must be integer"
t7 = T[vc] // ERROR "non-integer|must be integer"
)
diff --git a/test/fixedbugs/issue4847.go b/test/fixedbugs/issue4847.go
index a99e80129..91a6568f2 100644
--- a/test/fixedbugs/issue4847.go
+++ b/test/fixedbugs/issue4847.go
@@ -19,6 +19,6 @@ func matchList(s *S) E { return matcher(matchAnyFn)(s) }
var foo = matcher(matchList)
-var matchAny = matcher(matchList) // ERROR "initialization loop"
+var matchAny = matcher(matchList) // ERROR "initialization loop|depends upon itself"
func matchAnyFn(s *S) (err E) { return matchAny(s) }
diff --git a/test/fixedbugs/issue5089.go b/test/fixedbugs/issue5089.go
index 14d6bde98..81b9f0521 100644
--- a/test/fixedbugs/issue5089.go
+++ b/test/fixedbugs/issue5089.go
@@ -8,8 +8,8 @@
package p
-import "bufio"
+import "bufio" // GCCGO_ERROR "previous"
-func (b *bufio.Reader) Buffered() int { // ERROR "non-local"
+func (b *bufio.Reader) Buffered() int { // ERROR "non-local|redefinition"
return -1
}
diff --git a/test/fixedbugs/issue5172.go b/test/fixedbugs/issue5172.go
index 2dd542a5d..a6acbd3db 100644
--- a/test/fixedbugs/issue5172.go
+++ b/test/fixedbugs/issue5172.go
@@ -14,6 +14,6 @@ type foo struct {
func main() {
var f foo
- go f.bar()
- defer f.bar()
+ go f.bar() // GCCGO_ERROR "undefined"
+ defer f.bar() // GCCGO_ERROR "undefined"
}
diff --git a/test/fixedbugs/issue5358.go b/test/fixedbugs/issue5358.go
index 75aa9533d..c2b1da9e0 100644
--- a/test/fixedbugs/issue5358.go
+++ b/test/fixedbugs/issue5358.go
@@ -13,5 +13,5 @@ func f(x int, y ...int) {}
func g() (int, []int)
func main() {
- f(g()) // ERROR "as type int in"
+ f(g()) // ERROR "as type int in|incompatible type"
}
diff --git a/test/fixedbugs/issue5581.go b/test/fixedbugs/issue5581.go
index 8c2d59729..36a4ad671 100644
--- a/test/fixedbugs/issue5581.go
+++ b/test/fixedbugs/issue5581.go
@@ -26,7 +26,7 @@ type Foo struct {
type Bar struct {
A *Foo
- B chan Blah // ERROR "undefined: Blah"
+ B chan Blah // ERROR "undefined.*Blah"
}
func main() {
diff --git a/test/funcdup.go b/test/funcdup.go
index 706dd63ca..d15d68579 100644
--- a/test/funcdup.go
+++ b/test/funcdup.go
@@ -7,21 +7,21 @@
package p
type T interface {
- F1(i int) (i int) // ERROR "duplicate argument i"
- F2(i, i int) // ERROR "duplicate argument i"
- F3() (i, i int) // ERROR "duplicate argument i"
+ F1(i int) (i int) // ERROR "duplicate argument i|redefinition|previous"
+ F2(i, i int) // ERROR "duplicate argument i|redefinition|previous"
+ F3() (i, i int) // ERROR "duplicate argument i|redefinition|previous"
}
-type T1 func(i, i int) // ERROR "duplicate argument i"
-type T2 func(i int) (i int) // ERROR "duplicate argument i"
-type T3 func() (i, i int) // ERROR "duplicate argument i"
+type T1 func(i, i int) // ERROR "duplicate argument i|redefinition|previous"
+type T2 func(i int) (i int) // ERROR "duplicate argument i|redefinition|previous"
+type T3 func() (i, i int) // ERROR "duplicate argument i|redefinition|previous"
type R struct{}
-func (i *R) F1(i int) {} // ERROR "duplicate argument i"
-func (i *R) F2() (i int) {return 0} // ERROR "duplicate argument i"
-func (i *R) F3(j int) (j int) {return 0} // ERROR "duplicate argument j"
+func (i *R) F1(i int) {} // ERROR "duplicate argument i|redefinition|previous"
+func (i *R) F2() (i int) {return 0} // ERROR "duplicate argument i|redefinition|previous"
+func (i *R) F3(j int) (j int) {return 0} // ERROR "duplicate argument j|redefinition|previous"
-func F1(i, i int) {} // ERROR "duplicate argument i"
-func F2(i int) (i int) {return 0} // ERROR "duplicate argument i"
-func F3() (i, i int) {return 0, 0} // ERROR "duplicate argument i"
+func F1(i, i int) {} // ERROR "duplicate argument i|redefinition|previous"
+func F2(i int) (i int) {return 0} // ERROR "duplicate argument i|redefinition|previous"
+func F3() (i, i int) {return 0, 0} // ERROR "duplicate argument i|redefinition|previous"
diff --git a/test/funcdup2.go b/test/funcdup2.go
index aeb5f7eb6..1db1a396b 100644
--- a/test/funcdup2.go
+++ b/test/funcdup2.go
@@ -7,11 +7,11 @@
package p
var T interface {
- F1(i int) (i int) // ERROR "duplicate argument i"
- F2(i, i int) // ERROR "duplicate argument i"
- F3() (i, i int) // ERROR "duplicate argument i"
+ F1(i int) (i int) // ERROR "duplicate argument i|redefinition|previous"
+ F2(i, i int) // ERROR "duplicate argument i|redefinition|previous"
+ F3() (i, i int) // ERROR "duplicate argument i|redefinition|previous"
}
-var T1 func(i, i int) // ERROR "duplicate argument i"
-var T2 func(i int) (i int) // ERROR "duplicate argument i"
-var T3 func() (i, i int) // ERROR "duplicate argument i"
+var T1 func(i, i int) // ERROR "duplicate argument i|redefinition|previous"
+var T2 func(i int) (i int) // ERROR "duplicate argument i|redefinition|previous"
+var T3 func() (i, i int) // ERROR "duplicate argument i|redefinition|previous"
diff --git a/test/slice3err.go b/test/slice3err.go
index 906b00703..83fb39be4 100644
--- a/test/slice3err.go
+++ b/test/slice3err.go
@@ -54,58 +54,58 @@ func f() {
// check invalid indices
_ = array[1:2]
- _ = array[2:1] // ERROR "invalid slice index"
+ _ = array[2:1] // ERROR "invalid slice index|inverted slice"
_ = array[2:2]
_ = array[i:1]
_ = array[1:j]
_ = array[1:2:3]
- _ = array[1:3:2] // ERROR "invalid slice index"
- _ = array[2:1:3] // ERROR "invalid slice index"
- _ = array[2:3:1] // ERROR "invalid slice index"
- _ = array[3:1:2] // ERROR "invalid slice index"
- _ = array[3:2:1] // ERROR "invalid slice index"
+ _ = array[1:3:2] // ERROR "invalid slice index|inverted slice"
+ _ = array[2:1:3] // ERROR "invalid slice index|inverted slice"
+ _ = array[2:3:1] // ERROR "invalid slice index|inverted slice"
+ _ = array[3:1:2] // ERROR "invalid slice index|inverted slice"
+ _ = array[3:2:1] // ERROR "invalid slice index|inverted slice"
_ = array[i:1:2]
- _ = array[i:2:1] // ERROR "invalid slice index"
+ _ = array[i:2:1] // ERROR "invalid slice index|inverted slice"
_ = array[1:j:2]
_ = array[2:j:1] // ERROR "invalid slice index"
_ = array[1:2:k]
- _ = array[2:1:k] // ERROR "invalid slice index"
+ _ = array[2:1:k] // ERROR "invalid slice index|inverted slice"
_ = slice[1:2]
- _ = slice[2:1] // ERROR "invalid slice index"
+ _ = slice[2:1] // ERROR "invalid slice index|inverted slice"
_ = slice[2:2]
_ = slice[i:1]
_ = slice[1:j]
_ = slice[1:2:3]
- _ = slice[1:3:2] // ERROR "invalid slice index"
- _ = slice[2:1:3] // ERROR "invalid slice index"
- _ = slice[2:3:1] // ERROR "invalid slice index"
- _ = slice[3:1:2] // ERROR "invalid slice index"
- _ = slice[3:2:1] // ERROR "invalid slice index"
+ _ = slice[1:3:2] // ERROR "invalid slice index|inverted slice"
+ _ = slice[2:1:3] // ERROR "invalid slice index|inverted slice"
+ _ = slice[2:3:1] // ERROR "invalid slice index|inverted slice"
+ _ = slice[3:1:2] // ERROR "invalid slice index|inverted slice"
+ _ = slice[3:2:1] // ERROR "invalid slice index|inverted slice"
_ = slice[i:1:2]
- _ = slice[i:2:1] // ERROR "invalid slice index"
+ _ = slice[i:2:1] // ERROR "invalid slice index|inverted slice"
_ = slice[1:j:2]
_ = slice[2:j:1] // ERROR "invalid slice index"
_ = slice[1:2:k]
- _ = slice[2:1:k] // ERROR "invalid slice index"
+ _ = slice[2:1:k] // ERROR "invalid slice index|inverted slice"
_ = str[1:2]
- _ = str[2:1] // ERROR "invalid slice index"
+ _ = str[2:1] // ERROR "invalid slice index|inverted slice"
_ = str[2:2]
_ = str[i:1]
_ = str[1:j]
// check out of bounds indices on array
- _ = array[11:11] // ERROR "out of bounds for 10-element array"
- _ = array[11:12] // ERROR "out of bounds for 10-element array"
- _ = array[11:] // ERROR "out of bounds for 10-element array"
- _ = array[:11] // ERROR "out of bounds for 10-element array"
- _ = array[1:11] // ERROR "out of bounds for 10-element array"
- _ = array[1:11:12] // ERROR "out of bounds for 10-element array"
- _ = array[1:2:11] // ERROR "out of bounds for 10-element array"
- _ = array[1:11:3] // ERROR "out of bounds for 10-element array"
- _ = array[11:2:3] // ERROR "out of bounds for 10-element array"
- _ = array[11:12:13] // ERROR "out of bounds for 10-element array"
+ _ = array[11:11] // ERROR "out of bounds"
+ _ = array[11:12] // ERROR "out of bounds"
+ _ = array[11:] // ERROR "out of bounds"
+ _ = array[:11] // ERROR "out of bounds"
+ _ = array[1:11] // ERROR "out of bounds"
+ _ = array[1:11:12] // ERROR "out of bounds"
+ _ = array[1:2:11] // ERROR "out of bounds"
+ _ = array[1:11:3] // ERROR "out of bounds|invalid slice index"
+ _ = array[11:2:3] // ERROR "out of bounds|inverted slice|invalid slice index"
+ _ = array[11:12:13] // ERROR "out of bounds"
// slice bounds not checked
_ = slice[11:11]
@@ -116,6 +116,6 @@ func f() {
_ = slice[1:11:12]
_ = slice[1:2:11]
_ = slice[1:11:3] // ERROR "invalid slice index"
- _ = slice[11:2:3] // ERROR "invalid slice index"
+ _ = slice[11:2:3] // ERROR "invalid slice index|inverted slice"
_ = slice[11:12:13]
}
diff --git a/test/syntax/semi1.go b/test/syntax/semi1.go
index cc30f2654..6e0428121 100644
--- a/test/syntax/semi1.go
+++ b/test/syntax/semi1.go
@@ -7,7 +7,7 @@
package main
func main() {
- if x; y // ERROR "missing { after if clause|undefined"
+ if x; y // ERROR "missing .*{.* after if clause|undefined"
{
z // GCCGO_ERROR "undefined"
diff --git a/test/syntax/semi2.go b/test/syntax/semi2.go
index 61b8bf6d4..23d7bd0ee 100644
--- a/test/syntax/semi2.go
+++ b/test/syntax/semi2.go
@@ -7,7 +7,7 @@
package main
func main() {
- switch x; y // ERROR "missing { after switch clause|undefined"
+ switch x; y // ERROR "missing .*{.* after switch clause|undefined"
{
z
diff --git a/test/syntax/semi3.go b/test/syntax/semi3.go
index bb87520c5..ca070d8a5 100644
--- a/test/syntax/semi3.go
+++ b/test/syntax/semi3.go
@@ -7,7 +7,7 @@
package main
func main() {
- for x; y; z // ERROR "missing { after for clause|undefined"
+ for x; y; z // ERROR "missing .*{.* after for clause|undefined"
{
z // GCCGO_ERROR "undefined"
diff --git a/test/syntax/semi4.go b/test/syntax/semi4.go
index 00fa3f575..99c2d2256 100644
--- a/test/syntax/semi4.go
+++ b/test/syntax/semi4.go
@@ -8,7 +8,7 @@ package main
func main() {
for x // GCCGO_ERROR "undefined"
- { // ERROR "missing { after for clause"
+ { // ERROR "missing .*{.* after for clause"
z // GCCGO_ERROR "undefined"
diff --git a/test/typecheck.go b/test/typecheck.go
index 239ceacc6..a2ad91ff4 100644
--- a/test/typecheck.go
+++ b/test/typecheck.go
@@ -13,6 +13,6 @@ func mine(int b) int { // ERROR "undefined.*b"
}
func main() {
- mine()
- c = mine() // ERROR "undefined.*c" "cannot assign to c"
+ mine() // GCCGO_ERROR "not enough arguments"
+ c = mine() // ERROR "undefined.*c|not enough arguments" "cannot assign to c"
}