]> Cypherpunks repositories - gostls13.git/commitdiff
test: match gofrontend error messages
authorIan Lance Taylor <iant@golang.org>
Thu, 10 Dec 2020 02:51:12 +0000 (18:51 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 10 Dec 2020 18:34:40 +0000 (18:34 +0000)
fixedbugs/bug13343.go:10:12: error: initialization expressions for ‘b’ and ‘c’ depend upon each other
fixedbugs/bug13343.go:11:9: note: ‘c’ defined here
fixedbugs/bug13343.go:11:9: error: initialization expression for ‘c’ depends upon itself
fixedbugs/bug13343.go:11:9: error: initialization expressions for ‘c’ and ‘b’ depend upon each other
fixedbugs/bug13343.go:10:12: note: ‘b’ defined here

fixedbugs/issue10700.dir/test.go:24:10: error: reference to method ‘Do’ in type that is pointer to interface, not interface
fixedbugs/issue10700.dir/test.go:25:10: error: reference to method ‘do’ in type that is pointer to interface, not interface
fixedbugs/issue10700.dir/test.go:27:10: error: reference to method ‘Dont’ in type that is pointer to interface, not interface
fixedbugs/issue10700.dir/test.go:28:13: error: reference to undefined field or method ‘Dont’
fixedbugs/issue10700.dir/test.go:31:10: error: reference to undefined field or method ‘do’
fixedbugs/issue10700.dir/test.go:33:13: error: reference to undefined field or method ‘do’
fixedbugs/issue10700.dir/test.go:34:10: error: reference to undefined field or method ‘Dont’
fixedbugs/issue10700.dir/test.go:35:13: error: reference to undefined field or method ‘Dont’
fixedbugs/issue10700.dir/test.go:37:10: error: reference to method ‘Do’ in type that is pointer to interface, not interface
fixedbugs/issue10700.dir/test.go:38:10: error: reference to method ‘do’ in type that is pointer to interface, not interface
fixedbugs/issue10700.dir/test.go:40:13: error: reference to undefined field or method ‘do’
fixedbugs/issue10700.dir/test.go:41:10: error: reference to method ‘Dont’ in type that is pointer to interface, not interface
fixedbugs/issue10700.dir/test.go:42:13: error: reference to undefined field or method ‘Dont’
fixedbugs/issue10700.dir/test.go:43:10: error: reference to method ‘secret’ in type that is pointer to interface, not interface
fixedbugs/issue10700.dir/test.go:44:13: error: reference to unexported field or method ‘secret’

fixedbugs/issue10975.go:13:9: error: interface contains embedded non-interface

fixedbugs/issue11326.go:26:17: error: floating-point constant overflow
fixedbugs/issue11326.go:27:17: error: floating-point constant overflow
fixedbugs/issue11326.go:28:17: error: floating-point constant overflow

fixedbugs/issue11361.go:9:11: error: import file ‘fmt’ not found
fixedbugs/issue11361.go:11:11: error: reference to undefined name ‘fmt’

fixedbugs/issue11371.go:12:15: error: floating-point constant truncated to integer
fixedbugs/issue11371.go:13:15: error: integer constant overflow
fixedbugs/issue11371.go:17:15: error: floating-point constant truncated to integer

fixedbugs/issue11590.go:9:17: error: integer constant overflow
fixedbugs/issue11590.go:9:17: error: integer constant overflow
fixedbugs/issue11590.go:10:22: error: complex real part overflow
fixedbugs/issue11590.go:10:22: error: complex real part overflow
fixedbugs/issue11590.go:11:23: error: complex real part overflow
fixedbugs/issue11590.go:11:23: error: complex real part overflow
fixedbugs/issue11590.go:9:19: error: integer constant overflow
fixedbugs/issue11590.go:10:24: error: complex real part overflow
fixedbugs/issue11590.go:11:25: error: complex real part overflow

fixedbugs/issue11610.go:11:7: error: import path is empty
fixedbugs/issue11610.go:12:4: error: invalid character 0x3f in input file
fixedbugs/issue11610.go:14:1: error: expected identifier
fixedbugs/issue11610.go:14:1: error: expected type

fixedbugs/issue11614.go:14:9: error: interface contains embedded non-interface

fixedbugs/issue13248.go:13:1: error: expected operand
fixedbugs/issue13248.go:13:1: error: missing ‘)’
fixedbugs/issue13248.go:12:5: error: reference to undefined name ‘foo’

fixedbugs/issue13266.go:10:8: error: package name must be an identifier
fixedbugs/issue13266.go:10:8: error: expected ‘;’ or newline after package clause
fixedbugs/issue13266.go:10:8: error: expected declaration

fixedbugs/issue13273.go:50:18: error: expected ‘chan’
fixedbugs/issue13273.go:53:24: error: expected ‘chan’

fixedbugs/issue13274.go:11:58: error: expected ‘}’

fixedbugs/issue13365.go:14:19: error: index expression is negative
fixedbugs/issue13365.go:15:21: error: index expression is negative
fixedbugs/issue13365.go:16:22: error: index expression is negative
fixedbugs/issue13365.go:19:13: error: some element keys in composite literal are out of range
fixedbugs/issue13365.go:22:19: error: incompatible type for element 1 in composite literal
fixedbugs/issue13365.go:23:21: error: incompatible type for element 1 in composite literal
fixedbugs/issue13365.go:24:22: error: incompatible type for element 1 in composite literal

fixedbugs/issue13415.go:14:5: error: redefinition of ‘x’
fixedbugs/issue13415.go:14:5: note: previous definition of ‘x’ was here
fixedbugs/issue13415.go:14:5: error: ‘x’ declared but not used

fixedbugs/issue13471.go:12:25: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:13:25: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:14:25: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:15:24: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:16:23: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:18:26: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:19:26: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:20:26: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:21:25: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:22:24: error: floating-point constant truncated to integer
fixedbugs/issue13471.go:24:24: error: floating-point constant truncated to integer

fixedbugs/issue13821b.go:18:12: error: incompatible types in binary expression
fixedbugs/issue13821b.go:19:13: error: incompatible types in binary expression
fixedbugs/issue13821b.go:20:13: error: incompatible types in binary expression
fixedbugs/issue13821b.go:21:13: error: incompatible types in binary expression
fixedbugs/issue13821b.go:22:13: error: incompatible types in binary expression
fixedbugs/issue13821b.go:24:12: error: incompatible types in binary expression

fixedbugs/issue14006.go:24:18: error: expected ‘;’ or ‘}’ or newline
fixedbugs/issue14006.go:30:18: error: expected ‘;’ or ‘}’ or newline
fixedbugs/issue14006.go:37:22: error: expected ‘;’ or ‘}’ or newline
fixedbugs/issue14006.go:43:22: error: expected ‘;’ or ‘}’ or newline
fixedbugs/issue14006.go:59:17: note: previous definition of ‘labelname’ was here
fixedbugs/issue14006.go:64:17: error: label ‘labelname’ already defined
fixedbugs/issue14006.go:24:17: error: value computed is not used
fixedbugs/issue14006.go:30:17: error: value computed is not used
fixedbugs/issue14006.go:37:20: error: value computed is not used
fixedbugs/issue14006.go:43:20: error: value computed is not used
fixedbugs/issue14006.go:59:17: error: label ‘labelname’ defined and not used

fixedbugs/issue14010.go:13:14: error: invalid left hand side of assignment
fixedbugs/issue14010.go:14:14: error: invalid left hand side of assignment
fixedbugs/issue14010.go:14:9: error: invalid use of type

fixedbugs/issue14321.go:30:10: error: method ‘F’ is ambiguous in type ‘C’
fixedbugs/issue14321.go:31:10: error: ‘G’ is ambiguous via ‘A’ and ‘B’
fixedbugs/issue14321.go:33:10: error: type ‘C’ has no method ‘I’

fixedbugs/issue8183.go:12:14: error: integer constant overflow

fixedbugs/issue9036.go:21:12: error: invalid prefix for floating constant
fixedbugs/issue9036.go:22:12: error: invalid prefix for floating constant

fixedbugs/issue9076.go:14:5: error: incompatible type in initialization (cannot use type uintptr as type int32)
fixedbugs/issue9076.go:15:5: error: incompatible type in initialization (cannot use type uintptr as type int32)

For issue9083.go avoid an error about a variable that is set but not used.

fixedbugs/issue9370.go:105:13: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:106:13: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:107:13: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:108:13: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:109:13: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:110:13: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:112:18: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:113:18: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:114:18: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:115:18: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:116:18: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:117:18: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:119:13: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:119:18: error: cannot use ‘_’ as value
fixedbugs/issue9370.go:36:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:39:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:43:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:46:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:50:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:53:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:56:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:57:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:58:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:59:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:60:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:61:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:65:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:68:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:70:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:71:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:72:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:73:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:74:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:75:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:77:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:78:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:79:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:80:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:81:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:82:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:84:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:85:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:86:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:87:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:88:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:89:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:91:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:92:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:93:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:94:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:95:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:96:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:98:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:99:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:100:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:101:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:102:15: error: invalid operation (func can only be compared to nil)
fixedbugs/issue9370.go:103:15: error: invalid comparison of non-ordered type
fixedbugs/issue9370.go:121:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:122:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:123:15: error: incompatible types in binary expression
fixedbugs/issue9370.go:124:15: error: incompatible types in binary expression

Change-Id: I4089de4919112b08f5f2bbec20f84fcc7dbe3955
Reviewed-on: https://go-review.googlesource.com/c/go/+/276832
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
25 files changed:
test/fixedbugs/bug13343.go
test/fixedbugs/issue10700.dir/test.go
test/fixedbugs/issue10975.go
test/fixedbugs/issue11326.go
test/fixedbugs/issue11361.go
test/fixedbugs/issue11371.go
test/fixedbugs/issue11590.go
test/fixedbugs/issue11610.go
test/fixedbugs/issue11614.go
test/fixedbugs/issue13248.go
test/fixedbugs/issue13266.go
test/fixedbugs/issue13273.go
test/fixedbugs/issue13274.go
test/fixedbugs/issue13365.go
test/fixedbugs/issue13415.go
test/fixedbugs/issue13471.go
test/fixedbugs/issue13821b.go
test/fixedbugs/issue14006.go
test/fixedbugs/issue14010.go
test/fixedbugs/issue14321.go
test/fixedbugs/issue8183.go
test/fixedbugs/issue9036.go
test/fixedbugs/issue9076.go
test/fixedbugs/issue9083.go
test/fixedbugs/issue9370.go

index 5dc736d443b949225f8e3070e8ec86c4493a6efc..a7febeae7e0c00e6606ed173857ec8b1fcf9f34c 100644 (file)
@@ -7,8 +7,8 @@
 package main
 
 var (
-       a, b = f() // ERROR "initialization loop|depends upon itself"
-       c    = b
+       a, b = f() // ERROR "initialization loop|depends upon itself|depend upon each other"
+       c    = b   // GCCGO_ERROR "depends upon itself|depend upon each other"
 )
 
 func f() (int, int) {
index 2033efc9d83d0af61d108962e7ac9ca545b3e741..2dfc24af077cce048195d0dcb2570b294a76f27d 100644 (file)
@@ -21,27 +21,27 @@ func (me *HasAMethod) Do() {
 }
 
 func InMyCode(x *Imported, y *HasAMethod, z *other.Exported) {
-       x.Do() // ERROR "x\.Do undefined \(type \*Imported is pointer to interface, not interface\)"
-       x.do() // ERROR "x\.do undefined \(type \*Imported is pointer to interface, not interface\)"
+       x.Do() // ERROR "x\.Do undefined \(type \*Imported is pointer to interface, not interface\)|type that is pointer to interface"
+       x.do() // ERROR "x\.do undefined \(type \*Imported is pointer to interface, not interface\)|type that is pointer to interface"
        (*x).Do()
-       x.Dont()    // ERROR "x\.Dont undefined \(type \*Imported is pointer to interface, not interface\)"
-       (*x).Dont() // ERROR "\(\*x\)\.Dont undefined \(type Imported has no field or method Dont\)"
+       x.Dont()    // ERROR "x\.Dont undefined \(type \*Imported is pointer to interface, not interface\)|type that is pointer to interface"
+       (*x).Dont() // ERROR "\(\*x\)\.Dont undefined \(type Imported has no field or method Dont\)|reference to undefined field or method"
 
        y.Do()
-       y.do() // ERROR "y\.do undefined \(type \*HasAMethod has no field or method do, but does have Do\)"
+       y.do() // ERROR "y\.do undefined \(type \*HasAMethod has no field or method do, but does have Do\)|reference to undefined field or method"
        (*y).Do()
-       (*y).do()   // ERROR "\(\*y\)\.do undefined \(type HasAMethod has no field or method do, but does have Do\)"
-       y.Dont()    // ERROR "y\.Dont undefined \(type \*HasAMethod has no field or method Dont\)"
-       (*y).Dont() // ERROR "\(\*y\)\.Dont undefined \(type HasAMethod has no field or method Dont\)"
+       (*y).do()   // ERROR "\(\*y\)\.do undefined \(type HasAMethod has no field or method do, but does have Do\)|reference to undefined field or method"
+       y.Dont()    // ERROR "y\.Dont undefined \(type \*HasAMethod has no field or method Dont\)|reference to undefined field or method"
+       (*y).Dont() // ERROR "\(\*y\)\.Dont undefined \(type HasAMethod has no field or method Dont\)|reference to undefined field or method"
 
-       z.Do() // ERROR "z\.Do undefined \(type \*other\.Exported is pointer to interface, not interface\)"
-       z.do() // ERROR "z\.do undefined \(type \*other\.Exported is pointer to interface, not interface\)"
+       z.Do() // ERROR "z\.Do undefined \(type \*other\.Exported is pointer to interface, not interface\)|type that is pointer to interface"
+       z.do() // ERROR "z\.do undefined \(type \*other\.Exported is pointer to interface, not interface\)|type that is pointer to interface"
        (*z).Do()
-       (*z).do()     // ERROR "\(\*z\)\.do undefined \(type other.Exported has no field or method do, but does have Do\)"
-       z.Dont()      // ERROR "z\.Dont undefined \(type \*other\.Exported is pointer to interface, not interface\)"
-       (*z).Dont()   // ERROR "\(\*z\)\.Dont undefined \(type other\.Exported has no field or method Dont\)"
-       z.secret()    // ERROR "z\.secret undefined \(type \*other\.Exported is pointer to interface, not interface\)"
-       (*z).secret() // ERROR "\(\*z\)\.secret undefined \(cannot refer to unexported field or method secret\)"
+       (*z).do()     // ERROR "\(\*z\)\.do undefined \(type other.Exported has no field or method do, but does have Do\)|reference to undefined field or method"
+       z.Dont()      // ERROR "z\.Dont undefined \(type \*other\.Exported is pointer to interface, not interface\)|type that is pointer to interface"
+       (*z).Dont()   // ERROR "\(\*z\)\.Dont undefined \(type other\.Exported has no field or method Dont\)|reference to undefined field or method"
+       z.secret()    // ERROR "z\.secret undefined \(type \*other\.Exported is pointer to interface, not interface\)|type that is pointer to interface"
+       (*z).secret() // ERROR "\(\*z\)\.secret undefined \(cannot refer to unexported field or method secret\)|reference to unexported field or method"
 
 }
 
index b5f043f0a7329c939cea05cc9bcb0bd545d2bcd9..933badfd2f3ebd40b9b2b536d482f2ddb91da114 100644 (file)
@@ -10,7 +10,7 @@
 package main
 
 type I interface {
-       int // ERROR "interface contains embedded non-interface int"
+       int // ERROR "interface contains embedded non-interface"
 }
 
 func New() I {
index 82754c73fba625e1ba3aae3a684311ba4378a030..f3037d53c496fb55c283ec9942dfa6f3243258f1 100644 (file)
@@ -18,14 +18,14 @@ func main() {
 
        // Any implementation must be able to handle these constants at
        // compile time (even though they cannot be assigned to a float64).
-       var _ = 1e646456992  // ERROR "1e\+646456992 overflows float64"
-       var _ = 1e64645699   // ERROR "1e\+64645699 overflows float64"
-       var _ = 1e6464569    // ERROR "1e\+6464569 overflows float64"
-       var _ = 1e646456     // ERROR "1e\+646456 overflows float64"
-       var _ = 1e64645      // ERROR "1e\+64645 overflows float64"
-       var _ = 1e6464       // ERROR "1e\+6464 overflows float64"
-       var _ = 1e646        // ERROR "1e\+646 overflows float64"
-       var _ = 1e309        // ERROR "1e\+309 overflows float64"
+       var _ = 1e646456992  // ERROR "1e\+646456992 overflows float64|floating-point constant overflow"
+       var _ = 1e64645699   // ERROR "1e\+64645699 overflows float64|floating-point constant overflow"
+       var _ = 1e6464569    // ERROR "1e\+6464569 overflows float64|floating-point constant overflow"
+       var _ = 1e646456     // ERROR "1e\+646456 overflows float64|floating-point constant overflow"
+       var _ = 1e64645      // ERROR "1e\+64645 overflows float64|floating-point constant overflow"
+       var _ = 1e6464       // ERROR "1e\+6464 overflows float64|floating-point constant overflow"
+       var _ = 1e646        // ERROR "1e\+646 overflows float64|floating-point constant overflow"
+       var _ = 1e309        // ERROR "1e\+309 overflows float64|floating-point constant overflow"
 
        var _ = 1e308
 }
index 1260ea89c91ebaf9205f106fe8e21ed4ac33b5fd..63dbf05d731ac6109e18d074ab392afd7099e59e 100644 (file)
@@ -6,6 +6,6 @@
 
 package a
 
-import "fmt"  // ERROR "imported and not used"
+import "fmt"  // GC_ERROR "imported and not used"
 
-const n = fmt // ERROR "fmt without selector"
+const n = fmt // ERROR "fmt without selector|unexpected reference to package"
index b2d966fac8f3e68b01fd731da8a7f39120906b77..05b8fcfebeb4fb6e44a60ba8b5b5f3d11d355ad6 100644 (file)
@@ -9,9 +9,9 @@
 
 package issue11371
 
-const a int = 1.1        // ERROR "constant 1.1 truncated to integer"
-const b int = 1e20       // ERROR "overflows int"
+const a int = 1.1        // ERROR "constant 1.1 truncated to integer|floating-point constant truncated to integer"
+const b int = 1e20       // ERROR "overflows int|integer constant overflow"
 const c int = 1 + 1e-100 // ERROR "constant truncated to integer"
 const d int = 1 - 1e-100 // ERROR "constant truncated to integer"
 const e int = 1.00000001 // ERROR "constant truncated to integer"
-const f int = 0.00000001 // ERROR "constant 1e-08 truncated to integer"
+const f int = 0.00000001 // ERROR "constant 1e-08 truncated to integer|floating-point constant truncated to integer"
index 09345473fb0df57363f6d1500becdd183d8eb551..f2a955f96d06724151f26a210ce509a86647e810 100644 (file)
@@ -6,6 +6,6 @@
 
 package p
 
-var _ = int8(4) * 300         // ERROR "constant 300 overflows int8" "constant 1200 overflows int8"
-var _ = complex64(1) * 1e200  // ERROR "constant 1e\+200 overflows complex64"
-var _ = complex128(1) * 1e500 // ERROR "constant 1e\+500 overflows complex128"
+var _ = int8(4) * 300         // ERROR "constant 300 overflows int8" "constant 1200 overflows int8|integer constant overflow"
+var _ = complex64(1) * 1e200  // ERROR "constant 1e\+200 overflows complex64|complex real part overflow"
+var _ = complex128(1) * 1e500 // ERROR "constant 1e\+500 overflows complex128|complex real part overflow"
index 8ca31bf394b84dcab42fcd17912542c179359eca..7ebfae6709f35d6777aef45c131b36b7e118885d 100644 (file)
@@ -9,9 +9,9 @@
 
 package a
 import""  // ERROR "import path is empty"
-var?      // ERROR "invalid character U\+003F '\?'"
+var?      // ERROR "invalid character U\+003F '\?'|invalid character 0x3f in input file"
 
-var x int // ERROR "unexpected var"
+var x int // ERROR "unexpected var|expected identifier|expected type"
 
 func main() {
 }
index 91f134d44a9ab1f51a41196ba99dfbe54db0d6cf..d1642a3faf0d9ccbc5acdc8f63264a35091b1246 100644 (file)
@@ -11,7 +11,7 @@
 package main
 
 type I interface {
-       int // ERROR "interface contains embedded non-interface int"
+       int // ERROR "interface contains embedded non-interface"
 }
 
 func n() {
index 524628159c4bd7809eab4cabe2d1f6a1e81f9738..e23ba47b5867a1ec11f79702a0970741d9c8ac47 100644 (file)
@@ -9,5 +9,5 @@
 package main
 
 func main() {
-    foo(
-} // ERROR "unexpected }"
+    foo( // GCCGO_ERROR "undefined name"
+} // ERROR "unexpected }|expected operand|missing"
index 37c5594a241501a69d9e167a37a7190b36ae45e3..73c9e16bcc247f4b2f077d22ba828bd813e3b198 100644 (file)
@@ -7,4 +7,4 @@
 // Offending character % must not be interpreted as
 // start of format verb when emitting error message.
 
-package% // ERROR "unexpected %"
+package% // ERROR "unexpected %|package name must be an identifier|after package clause|expected declaration"
index f8f679daab9e26ff23387d76cc5ee23fc28aef55..2498da4d47161aa7c585bbee08387bf36ba44d28 100644 (file)
@@ -47,9 +47,9 @@ func f() {
        <-(<-chan (<-chan (<-chan (<-chan int))))(nil)
        <-(<-chan (<-chan (<-chan (<-chan (<-chan int)))))(nil)
 
-       type _ <-<-chan int // ERROR "unexpected <-, expecting chan"
+       type _ <-<-chan int // ERROR "unexpected <-, expecting chan|expected .*chan.*"
        <-<-chan int // ERROR "unexpected <-, expecting chan|expecting {" (new parser: same error as for type decl)
 
-       type _ <-chan<-int // ERROR "unexpected int, expecting chan|expecting chan"
+       type _ <-chan<-int // ERROR "unexpected int, expecting chan|expected .*chan.*|expecting chan|expected .*;.* or .*}.* or newline"
        <-chan<-int // ERROR "unexpected int, expecting chan|expecting {" (new parser: same error as for type decl)
 }
index 480f5bcc1134d9ac700cac9e06a0711d924e6f0e..816bd9b8f27320d459278892d2c274b765dd1879 100644 (file)
@@ -8,4 +8,4 @@
 
 package p
 
-var f = func() { // ERROR "unexpected EOF"
\ No newline at end of file
+var f = func() { // ERROR "unexpected EOF|expected .*}.*"
\ No newline at end of file
index 4bd103e38d6dd701930d78e500c332055beba212..31a663eb1f69459093f2fe64c8bc82614fcfa9c8 100644 (file)
@@ -11,15 +11,15 @@ package main
 var t struct{}
 
 func main() {
-       _ = []int{-1: 0}    // ERROR "index must be non\-negative integer constant"
-       _ = [10]int{-1: 0}  // ERROR "index must be non\-negative integer constant"
-       _ = [...]int{-1: 0} // ERROR "index must be non\-negative integer constant"
+       _ = []int{-1: 0}    // ERROR "index must be non\-negative integer constant|index expression is negative"
+       _ = [10]int{-1: 0}  // ERROR "index must be non\-negative integer constant|index expression is negative"
+       _ = [...]int{-1: 0} // ERROR "index must be non\-negative integer constant|index expression is negative"
 
        _ = []int{100: 0}
-       _ = [10]int{100: 0} // ERROR "array index 100 out of bounds"
+       _ = [10]int{100: 0} // ERROR "array index 100 out of bounds|out of range"
        _ = [...]int{100: 0}
 
-       _ = []int{t}    // ERROR "cannot use .* as type int in slice literal"
-       _ = [10]int{t}  // ERROR "cannot use .* as type int in array literal"
-       _ = [...]int{t} // ERROR "cannot use .* as type int in array literal"
+       _ = []int{t}    // ERROR "cannot use .* as type int in slice literal|incompatible type"
+       _ = [10]int{t}  // ERROR "cannot use .* as type int in array literal|incompatible type"
+       _ = [...]int{t} // ERROR "cannot use .* as type int in array literal|incompatible type"
 }
index 989a1ed50f12bea9e79bfa1e7a45312d06ec7e72..4c4655e547356d3949a8ad322756c82728e9f650 100644 (file)
@@ -11,7 +11,7 @@ package p
 
 func f() {
     select {
-    case x, x := <-func() chan int { // ERROR "x repeated on left side of :="
+    case x, x := <-func() chan int { // ERROR "x repeated on left side of :=|redefinition|declared but not used"
             c := make(chan int)
             return c
     }():
index 0bfed4261670384b2c693dc623e7f92754d1571c..9bfc8c3d2cffd62c7cc9d1da6c96754759c45425 100644 (file)
@@ -9,17 +9,17 @@
 package main
 
 func main() {
-       const _ int64 = 1e646456992 // ERROR "integer too large"
-       const _ int32 = 1e64645699  // ERROR "integer too large"
-       const _ int16 = 1e6464569   // ERROR "integer too large"
-       const _ int8 = 1e646456     // ERROR "integer too large"
-       const _ int = 1e64645       // ERROR "integer too large"
+       const _ int64 = 1e646456992 // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ int32 = 1e64645699  // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ int16 = 1e6464569   // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ int8 = 1e646456     // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ int = 1e64645       // ERROR "integer too large|floating-point constant truncated to integer"
 
-       const _ uint64 = 1e646456992 // ERROR "integer too large"
-       const _ uint32 = 1e64645699  // ERROR "integer too large"
-       const _ uint16 = 1e6464569   // ERROR "integer too large"
-       const _ uint8 = 1e646456     // ERROR "integer too large"
-       const _ uint = 1e64645       // ERROR "integer too large"
+       const _ uint64 = 1e646456992 // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ uint32 = 1e64645699  // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ uint16 = 1e6464569   // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ uint8 = 1e646456     // ERROR "integer too large|floating-point constant truncated to integer"
+       const _ uint = 1e64645       // ERROR "integer too large|floating-point constant truncated to integer"
 
-       const _ rune = 1e64645 // ERROR "integer too large"
+       const _ rune = 1e64645 // ERROR "integer too large|floating-point constant truncated to integer"
 }
index be67cea6dde4da745646cecbb21d1764f089dea6..df68e8d6264c4be170aa9f458fae6f2b829611fb 100644 (file)
@@ -15,10 +15,10 @@ var b B
 var b2 B2
 var x1 = b && 1 < 2 // x1 has type B, not ideal bool
 var x2 = 1 < 2 && b // x2 has type B, not ideal bool
-var x3 = b && b2    // ERROR "mismatched types B and B2"
-var x4 = x1 && b2   // ERROR "mismatched types B and B2"
-var x5 = x2 && b2   // ERROR "mismatched types B and B2"
-var x6 = b2 && x1   // ERROR "mismatched types B2 and B"
-var x7 = b2 && x2   // ERROR "mismatched types B2 and B"
+var x3 = b && b2    // ERROR "mismatched types B and B2|incompatible types"
+var x4 = x1 && b2   // ERROR "mismatched types B and B2|incompatible types"
+var x5 = x2 && b2   // ERROR "mismatched types B and B2|incompatible types"
+var x6 = b2 && x1   // ERROR "mismatched types B2 and B|incompatible types"
+var x7 = b2 && x2   // ERROR "mismatched types B2 and B|incompatible types"
 
-var x8 = b && !B2(true) // ERROR "mismatched types B and B2"
+var x8 = b && !B2(true) // ERROR "mismatched types B and B2|incompatible types"
index 02041cc290019fff8f2f5fdbfb3945987609911c..9cad2b4c9d127d2153043e693e59cce10bf08042 100644 (file)
@@ -21,26 +21,26 @@ func f() {
        var x int
        switch x {
        case 1:
-               2:      // ERROR "unexpected :"
+               2:      // ERROR "unexpected :|expected .*;.* or .*}.* or newline|value computed is not used"
        case 2:
        }
 
        switch x {
        case 1:
-               2: ;    // ERROR "unexpected :"
+               2: ;    // ERROR "unexpected :|expected .*;.* or .*}.* or newline|value computed is not used"
        case 2:
        }
 
        var y string
        switch y {
        case "foo":
-               "bar":  // ERROR "unexpected :"
+               "bar":  // ERROR "unexpected :|expected .*;.* or .*}.* or newline|value computed is not used"
        case "bar":
        }
 
        switch y {
        case "foo":
-               "bar": ;        // ERROR "unexpected :"
+               "bar": ;        // ERROR "unexpected :|expected .*;.* or .*}.* or newline|value computed is not used"
        case "bar":
        }
 
@@ -56,12 +56,12 @@ func g() {
        var z bool
        switch {
        case z:
-               labelname:      // ERROR "label labelname defined and not used"
+               labelname:      // ERROR "label labelname defined and not used|previous definition|defined and not used"
        }
 
        switch {
        case z:
-               labelname: ;    // ERROR "label labelname already defined at LINE-5"
+               labelname: ;    // ERROR "label labelname already defined at LINE-5|label .*labelname.* already defined"
        case false:
        }
-}
\ No newline at end of file
+}
index 2786e107e80452da6a10ca5ec6200d36a67f9505..0b233342be54a07b6418192363adee4562327a97 100644 (file)
@@ -10,6 +10,6 @@
 package main
 
 func main() {
-       true = false // ERROR "cannot assign to true"
-       byte = 0     // ERROR "not an expression"
+       true = false // ERROR "cannot assign to true|invalid left hand side"
+       byte = 0     // ERROR "not an expression|invalid left hand side|invalid use of type"
 }
index 058008c386f18ae97344114df892d90f7bad4398..e1149c3f9d06d865a18ac574fa3adcaaf884425c 100644 (file)
@@ -27,7 +27,7 @@ type C struct {
        B
 }
 
-var _ = C.F // ERROR "ambiguous selector"
-var _ = C.G // ERROR "ambiguous selector"
-var _ = C.H // ERROR "ambiguous selector"
-var _ = C.I // ERROR "no method I"
+var _ = C.F // ERROR "ambiguous"
+var _ = C.G // ERROR "ambiguous"
+var _ = C.H // ERROR "ambiguous"
+var _ = C.I // ERROR "no method .*I.*"
index 531dd4dbf854cb828c03467364a9a5a7a41004ee..caac66734617841f71c371598efbbb6fbc8be205 100644 (file)
@@ -12,12 +12,12 @@ const (
        ok = byte(iota + 253)
        bad
        barn
-       bard // ERROR "constant 256 overflows byte"
+       bard // ERROR "constant 256 overflows byte|integer constant overflow"
 )
 
 const (
        c = len([1 - iota]int{})
        d
-       e // ERROR "array bound must be non-negative"
-       f // ERROR "array bound must be non-negative"
+       e // ERROR "array bound must be non-negative|negative array bound"
+       f // ERROR "array bound must be non-negative|negative array bound"
 )
index 38f06c30c875168937dde4887564713e1123e3df..e3d394f7f299cdfb1ed5f242c0751dbe555fc2a9 100644 (file)
@@ -18,8 +18,8 @@ const (
 )
 
 const x4 = 0x1p10 // valid hexadecimal float
-const x5 = 1p10   // ERROR "'p' exponent requires hexadecimal mantissa"
-const x6 = 0P0    // ERROR "'P' exponent requires hexadecimal mantissa"
+const x5 = 1p10   // ERROR "'p' exponent requires hexadecimal mantissa|invalid prefix"
+const x6 = 0P0    // ERROR "'P' exponent requires hexadecimal mantissa|invalid prefix"
 
 func main() {
        fmt.Printf("%g %T\n", x1, x1)
index 8daf12fee8be13c51e2c5c04e9be9dc5649a54ef..1613d5ede39aa34ef27ee92afdcaaf8009f49990 100644 (file)
@@ -11,5 +11,5 @@ package main
 import "unsafe"
 
 const Hundred = 100
-var _ int32 = 100/unsafe.Sizeof(int(0)) + 1 // GC_ERROR "100 \/ unsafe.Sizeof\(int\(0\)\) \+ 1"
-var _ int32 = Hundred/unsafe.Sizeof(int(0)) + 1 // GC_ERROR "Hundred \/ unsafe.Sizeof\(int\(0\)\) \+ 1"
+var _ int32 = 100/unsafe.Sizeof(int(0)) + 1 // ERROR "100 \/ unsafe.Sizeof\(int\(0\)\) \+ 1|incompatible type"
+var _ int32 = Hundred/unsafe.Sizeof(int(0)) + 1 // ERROR "Hundred \/ unsafe.Sizeof\(int\(0\)\) \+ 1|incompatible type"
index 8fbd78be7a744cfb0e312de0933e1a29a040cc69..d4762f802e0914ef04fa38e7e1497bf15096bd65 100644 (file)
@@ -19,4 +19,5 @@ func main() {
        x = make(chan int) // ERROR "cannot use make\(chan int\)|incompatible"
        x = make(chan int, 0) // ERROR "cannot use make\(chan int, 0\)|incompatible"
        x = make(chan int, zero) // ERROR "cannot use make\(chan int, zero\)|incompatible"
+       _ = x
 }
index 120af35397628719a35811da9b5c6e376cafb0c7..6cc8d5b9e5d37418aeeee47de44a2acc7fd67fd9 100644 (file)
@@ -33,95 +33,95 @@ var (
 var (
        _ = e == c
        _ = e != c
-       _ = e >= c // ERROR "invalid operation.*not defined"
+       _ = e >= c // ERROR "invalid operation.*not defined|invalid comparison"
        _ = c == e
        _ = c != e
-       _ = c >= e // ERROR "invalid operation.*not defined"
+       _ = c >= e // ERROR "invalid operation.*not defined|invalid comparison"
 
        _ = i == c
        _ = i != c
-       _ = i >= c // ERROR "invalid operation.*not defined"
+       _ = i >= c // ERROR "invalid operation.*not defined|invalid comparison"
        _ = c == i
        _ = c != i
-       _ = c >= i // ERROR "invalid operation.*not defined"
+       _ = c >= i // ERROR "invalid operation.*not defined|invalid comparison"
 
        _ = e == n
        _ = e != n
-       _ = e >= n // ERROR "invalid operation.*not defined"
+       _ = e >= n // ERROR "invalid operation.*not defined|invalid comparison"
        _ = n == e
        _ = n != e
-       _ = n >= e // ERROR "invalid operation.*not defined"
+       _ = n >= e // ERROR "invalid operation.*not defined|invalid comparison"
 
        // i and n are not assignable to each other
-       _ = i == n // ERROR "invalid operation.*mismatched types"
-       _ = i != n // ERROR "invalid operation.*mismatched types"
-       _ = i >= n // ERROR "invalid operation.*mismatched types"
-       _ = n == i // ERROR "invalid operation.*mismatched types"
-       _ = n != i // ERROR "invalid operation.*mismatched types"
-       _ = n >= i // ERROR "invalid operation.*mismatched types"
+       _ = i == n // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = i != n // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = i >= n // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = n == i // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = n != i // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = n >= i // ERROR "invalid operation.*mismatched types|incompatible types"
 
        _ = e == 1
        _ = e != 1
-       _ = e >= 1 // ERROR "invalid operation.*not defined"
+       _ = e >= 1 // ERROR "invalid operation.*not defined|invalid comparison"
        _ = 1 == e
        _ = 1 != e
-       _ = 1 >= e // ERROR "invalid operation.*not defined"
-
-       _ = i == 1 // ERROR "invalid operation.*mismatched types"
-       _ = i != 1 // ERROR "invalid operation.*mismatched types"
-       _ = i >= 1 // ERROR "invalid operation.*mismatched types"
-       _ = 1 == i // ERROR "invalid operation.*mismatched types"
-       _ = 1 != i // ERROR "invalid operation.*mismatched types"
-       _ = 1 >= i // ERROR "invalid operation.*mismatched types"
-
-       _ = e == f // ERROR "invalid operation.*not defined"
-       _ = e != f // ERROR "invalid operation.*not defined"
-       _ = e >= f // ERROR "invalid operation.*not defined"
-       _ = f == e // ERROR "invalid operation.*not defined"
-       _ = f != e // ERROR "invalid operation.*not defined"
-       _ = f >= e // ERROR "invalid operation.*not defined"
-
-       _ = i == f // ERROR "invalid operation.*mismatched types"
-       _ = i != f // ERROR "invalid operation.*mismatched types"
-       _ = i >= f // ERROR "invalid operation.*mismatched types"
-       _ = f == i // ERROR "invalid operation.*mismatched types"
-       _ = f != i // ERROR "invalid operation.*mismatched types"
-       _ = f >= i // ERROR "invalid operation.*mismatched types"
-
-       _ = e == g // ERROR "invalid operation.*not defined"
-       _ = e != g // ERROR "invalid operation.*not defined"
-       _ = e >= g // ERROR "invalid operation.*not defined"
-       _ = g == e // ERROR "invalid operation.*not defined"
-       _ = g != e // ERROR "invalid operation.*not defined"
-       _ = g >= e // ERROR "invalid operation.*not defined"
-
-       _ = i == g // ERROR "invalid operation.*not defined"
-       _ = i != g // ERROR "invalid operation.*not defined"
-       _ = i >= g // ERROR "invalid operation.*not defined"
-       _ = g == i // ERROR "invalid operation.*not defined"
-       _ = g != i // ERROR "invalid operation.*not defined"
-       _ = g >= i // ERROR "invalid operation.*not defined"
-
-       _ = _ == e // ERROR "cannot use _ as value"
-       _ = _ == i // ERROR "cannot use _ as value"
-       _ = _ == c // ERROR "cannot use _ as value"
-       _ = _ == n // ERROR "cannot use _ as value"
-       _ = _ == f // ERROR "cannot use _ as value"
-       _ = _ == g // ERROR "cannot use _ as value"
-
-       _ = e == _ // ERROR "cannot use _ as value"
-       _ = i == _ // ERROR "cannot use _ as value"
-       _ = c == _ // ERROR "cannot use _ as value"
-       _ = n == _ // ERROR "cannot use _ as value"
-       _ = f == _ // ERROR "cannot use _ as value"
-       _ = g == _ // ERROR "cannot use _ as value"
-
-       _ = _ == _ // ERROR "cannot use _ as value"
-
-       _ = e ^ c // ERROR "invalid operation.*mismatched types"
-       _ = c ^ e // ERROR "invalid operation.*mismatched types"
-       _ = 1 ^ e // ERROR "invalid operation.*mismatched types"
-       _ = e ^ 1 // ERROR "invalid operation.*mismatched types"
+       _ = 1 >= e // ERROR "invalid operation.*not defined|invalid comparison"
+
+       _ = i == 1 // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = i != 1 // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = i >= 1 // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = 1 == i // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = 1 != i // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = 1 >= i // ERROR "invalid operation.*mismatched types|incompatible types"
+
+       _ = e == f // ERROR "invalid operation.*not defined|invalid operation"
+       _ = e != f // ERROR "invalid operation.*not defined|invalid operation"
+       _ = e >= f // ERROR "invalid operation.*not defined|invalid comparison"
+       _ = f == e // ERROR "invalid operation.*not defined|invalid operation"
+       _ = f != e // ERROR "invalid operation.*not defined|invalid operation"
+       _ = f >= e // ERROR "invalid operation.*not defined|invalid comparison"
+
+       _ = i == f // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = i != f // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = i >= f // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = f == i // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = f != i // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = f >= i // ERROR "invalid operation.*mismatched types|incompatible types"
+
+       _ = e == g // ERROR "invalid operation.*not defined|invalid operation"
+       _ = e != g // ERROR "invalid operation.*not defined|invalid operation"
+       _ = e >= g // ERROR "invalid operation.*not defined|invalid comparison"
+       _ = g == e // ERROR "invalid operation.*not defined|invalid operation"
+       _ = g != e // ERROR "invalid operation.*not defined|invalid operation"
+       _ = g >= e // ERROR "invalid operation.*not defined|invalid comparison"
+
+       _ = i == g // ERROR "invalid operation.*not defined|invalid operation"
+       _ = i != g // ERROR "invalid operation.*not defined|invalid operation"
+       _ = i >= g // ERROR "invalid operation.*not defined|invalid comparison"
+       _ = g == i // ERROR "invalid operation.*not defined|invalid operation"
+       _ = g != i // ERROR "invalid operation.*not defined|invalid operation"
+       _ = g >= i // ERROR "invalid operation.*not defined|invalid comparison"
+
+       _ = _ == e // ERROR "cannot use .*_.* as value"
+       _ = _ == i // ERROR "cannot use .*_.* as value"
+       _ = _ == c // ERROR "cannot use .*_.* as value"
+       _ = _ == n // ERROR "cannot use .*_.* as value"
+       _ = _ == f // ERROR "cannot use .*_.* as value"
+       _ = _ == g // ERROR "cannot use .*_.* as value"
+
+       _ = e == _ // ERROR "cannot use .*_.* as value"
+       _ = i == _ // ERROR "cannot use .*_.* as value"
+       _ = c == _ // ERROR "cannot use .*_.* as value"
+       _ = n == _ // ERROR "cannot use .*_.* as value"
+       _ = f == _ // ERROR "cannot use .*_.* as value"
+       _ = g == _ // ERROR "cannot use .*_.* as value"
+
+       _ = _ == _ // ERROR "cannot use .*_.* as value"
+
+       _ = e ^ c // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = c ^ e // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = 1 ^ e // ERROR "invalid operation.*mismatched types|incompatible types"
+       _ = e ^ 1 // ERROR "invalid operation.*mismatched types|incompatible types"
        _ = 1 ^ c
        _ = c ^ 1
 )