]> Cypherpunks repositories - gostls13.git/commitdiff
test: recognize gofrontend error messages
authorIan Lance Taylor <iant@golang.org>
Mon, 14 Dec 2020 21:26:35 +0000 (13:26 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 15 Dec 2020 02:35:59 +0000 (02:35 +0000)
fixedbugs/issue26416.go:24:16: error: unknown field ‘t1f1’ in ‘t2’
fixedbugs/issue26416.go:25:16: error: unknown field ‘t1f2’ in ‘t3’
fixedbugs/issue26416.go:26:16: error: unknown field ‘t2f1’ in ‘t3’

fixedbugs/issue26616.go:15:9: error: single variable set to multiple-value function call
fixedbugs/issue26616.go:9:5: error: incompatible type in initialization (multiple-value function call in single-value context)
fixedbugs/issue26616.go:12:13: error: incompatible type in initialization (multiple-value function call in single-value context)
fixedbugs/issue26616.go:13:13: error: incompatible type in initialization (multiple-value function call in single-value context)
fixedbugs/issue26616.go:15:9: error: incompatible type in initialization (multiple-value function call in single-value context)
fixedbugs/issue26616.go:14:11: error: incompatible types in assignment (multiple-value function call in single-value context)

fixedbugs/issue26855.go:23:12: error: incompatible type for field 1 in struct construction
fixedbugs/issue26855.go:27:12: error: incompatible type for field 1 in struct construction

fixedbugs/issue25958.go:14:18: error: expected ‘<-’ or ‘=’
fixedbugs/issue25958.go:15:35: error: expected ‘<-’ or ‘=’

fixedbugs/issue28079b.go:13:9: error: array bound is not constant
fixedbugs/issue28079b.go:16:22: error: invalid context-determined non-integer type for left operand of shift

fixedbugs/issue28079c.go:14:22: error: invalid context-determined non-integer type for left operand of shift

fixedbugs/issue28450.go:9:19: error: ‘...’ only permits one name
fixedbugs/issue28450.go:10:18: error: ‘...’ must be last parameter
fixedbugs/issue28450.go:11:16: error: ‘...’ must be last parameter
fixedbugs/issue28450.go:11:24: error: ‘...’ must be last parameter
fixedbugs/issue28450.go:13:25: error: ‘...’ must be last parameter
fixedbugs/issue28450.go:15:19: error: ‘...’ must be last parameter
fixedbugs/issue28450.go:16:21: error: ‘...’ must be last parameter
fixedbugs/issue28450.go:16:31: error: ‘...’ must be last parameter

fixedbugs/issue28268.go:20:1: error: method ‘E’ redeclares struct field name
fixedbugs/issue28268.go:19:1: error: method ‘b’ redeclares struct field name

fixedbugs/issue27356.go:14:14: error: expected function
fixedbugs/issue27356.go:18:9: error: expected function

fixedbugs/issue29855.go:13:11: error: unknown field ‘Name’ in ‘T’

fixedbugs/issue27938.go:14:15: error: expected package
fixedbugs/issue27938.go:18:13: error: expected package
fixedbugs/issue27938.go:22:13: error: expected package
fixedbugs/issue27938.go:22:9: error: expected signature or type name

fixedbugs/issue29870b.go:13:9: error: ‘x’ declared but not used

fixedbugs/issue30085.go:10:18: error: wrong number of initializations
fixedbugs/issue30085.go:11:21: error: wrong number of initializations

fixedbugs/issue30087.go:10:18: error: wrong number of initializations
fixedbugs/issue30087.go:11:11: error: number of variables does not match number of values
fixedbugs/issue30087.go:12:9: error: wrong number of initializations
fixedbugs/issue30087.go:13:9: error: wrong number of initializations

fixedbugs/issue28926.go:16:14: error: use of undefined type ‘G’
fixedbugs/issue28926.go:18:14: error: use of undefined type ‘E’
fixedbugs/issue28926.go:22:24: error: use of undefined type ‘T’

fixedbugs/issue30722.go:13:13: error: invalid numeric literal
fixedbugs/issue30722.go:14:13: error: invalid numeric literal
fixedbugs/issue30722.go:15:13: error: invalid numeric literal

fixedbugs/issue33308.go:12:19: error: invalid context-determined non-integer type for left operand of shift

fixedbugs/issue33386.go:16:9: error: expected operand
fixedbugs/issue33386.go:22:9: error: expected operand
fixedbugs/issue33386.go:26:17: error: expected operand
fixedbugs/issue33386.go:27:18: error: expected operand
fixedbugs/issue33386.go:28:29: error: expected operand
fixedbugs/issue33386.go:15:17: error: reference to undefined name ‘send’
fixedbugs/issue33386.go:27:13: error: reference to undefined name ‘a’
fixedbugs/issue33386.go:21:19: error: value computed is not used

fixedbugs/issue33460.go:34:10: error: duplicate key in map literal
fixedbugs/issue33460.go:21:9: error: duplicate case in switch
fixedbugs/issue33460.go:24:9: error: duplicate case in switch
fixedbugs/issue33460.go:25:9: error: duplicate case in switch

fixedbugs/issue32723.go:12:14: error: invalid comparison of non-ordered type
fixedbugs/issue32723.go:13:13: error: invalid comparison of non-ordered type
fixedbugs/issue32723.go:16:16: error: invalid comparison of non-ordered type
fixedbugs/issue32723.go:17:16: error: invalid comparison of non-ordered type
fixedbugs/issue32723.go:18:15: error: invalid comparison of non-ordered type
fixedbugs/issue32723.go:21:15: error: invalid comparison of non-ordered type

fixedbugs/issue35291.go:13:9: error: duplicate value for index 1

fixedbugs/issue38745.go:12:12: error: reference to undefined field or method ‘M’
fixedbugs/issue38745.go:13:16: error: reference to undefined field or method ‘M’
fixedbugs/issue38745.go:17:19: error: reference to undefined field or method ‘M’
fixedbugs/issue38745.go:17:9: error: not enough arguments to return

fixedbugs/issue41500.go:16:22: error: incompatible types in binary expression
fixedbugs/issue41500.go:17:26: error: incompatible types in binary expression
fixedbugs/issue41500.go:18:22: error: incompatible types in binary expression
fixedbugs/issue41500.go:19:26: error: incompatible types in binary expression

fixedbugs/issue41575.go:23:6: error: invalid recursive type
fixedbugs/issue41575.go:9:6: error: invalid recursive type ‘T1’
fixedbugs/issue41575.go:13:6: error: invalid recursive type ‘T2’
fixedbugs/issue41575.go:17:6: error: invalid recursive type ‘a’
fixedbugs/issue41575.go:18:6: error: invalid recursive type ‘b’
fixedbugs/issue41575.go:19:6: error: invalid recursive type ‘c’
fixedbugs/issue41575.go:25:6: error: invalid recursive type ‘g’
fixedbugs/issue41575.go:32:6: error: invalid recursive type ‘x’
fixedbugs/issue41575.go:33:6: error: invalid recursive type ‘y’

fixedbugs/issue4215.go:10:9: error: not enough arguments to return
fixedbugs/issue4215.go:14:9: error: return with value in function with no return type
fixedbugs/issue4215.go:19:17: error: not enough arguments to return
fixedbugs/issue4215.go:21:9: error: not enough arguments to return
fixedbugs/issue4215.go:27:17: error: not enough arguments to return
fixedbugs/issue4215.go:29:17: error: too many values in return statement
fixedbugs/issue4215.go:31:17: error: not enough arguments to return
fixedbugs/issue4215.go:43:17: error: not enough arguments to return
fixedbugs/issue4215.go:46:17: error: not enough arguments to return
fixedbugs/issue4215.go:48:9: error: too many values in return statement
fixedbugs/issue4215.go:52:9: error: too many values in return statement

fixedbugs/issue41247.go:10:16: error: incompatible type for return value 1

fixedbugs/issue41440.go:13:9: error: too many arguments

fixedbugs/issue6772.go:10:16: error: ‘a’ repeated on left side of :=
fixedbugs/issue6772.go:17:16: error: ‘a’ repeated on left side of :=

fixedbugs/issue6402.go:12:16: error: incompatible type for return value 1

fixedbugs/issue6403.go:13:23: error: reference to undefined identifier ‘syscall.X’
fixedbugs/issue6403.go:14:15: error: reference to undefined name ‘voidpkg’

fixedbugs/issue7746.go:24:20: error: constant multiplication overflow

fixedbugs/issue7760.go:15:7: error: invalid constant type
fixedbugs/issue7760.go:16:7: error: invalid constant type
fixedbugs/issue7760.go:18:7: error: invalid constant type
fixedbugs/issue7760.go:19:7: error: invalid constant type
fixedbugs/issue7760.go:21:11: error: expression is not constant
fixedbugs/issue7760.go:22:11: error: expression is not constant
fixedbugs/issue7760.go:24:7: error: invalid constant type
fixedbugs/issue7760.go:25:7: error: invalid constant type

fixedbugs/issue7129.go:18:11: error: argument 1 has incompatible type (cannot use type bool as type int)
fixedbugs/issue7129.go:19:11: error: argument 1 has incompatible type (cannot use type bool as type int)
fixedbugs/issue7129.go:20:11: error: argument 1 has incompatible type (cannot use type bool as type int)
fixedbugs/issue7129.go:20:17: error: argument 2 has incompatible type (cannot use type bool as type int)

fixedbugs/issue7150.go:12:20: error: index expression is negative
fixedbugs/issue7150.go:13:13: error: some element keys in composite literal are out of range
fixedbugs/issue7150.go:14:13: error: some element keys in composite literal are out of range
fixedbugs/issue7150.go:15:13: error: some element keys in composite literal are out of range
fixedbugs/issue7150.go:16:13: error: some element keys in composite literal are out of range

fixedbugs/issue7675.go:16:11: error: argument 1 has incompatible type (cannot use type int as type string)
fixedbugs/issue7675.go:16:24: error: argument 3 has incompatible type (cannot use type string as type float64)
fixedbugs/issue7675.go:16:9: error: not enough arguments
fixedbugs/issue7675.go:16:14: error: floating-point constant truncated to integer
fixedbugs/issue7675.go:18:11: error: argument 1 has incompatible type (cannot use type int as type string)
fixedbugs/issue7675.go:18:24: error: argument 3 has incompatible type (cannot use type string as type float64)
fixedbugs/issue7675.go:18:28: error: argument 4 has incompatible type (cannot use type int as type string)
fixedbugs/issue7675.go:18:9: error: too many arguments
fixedbugs/issue7675.go:18:14: error: floating-point constant truncated to integer
fixedbugs/issue7675.go:19:11: error: argument 1 has incompatible type (cannot use type int as type string)
fixedbugs/issue7675.go:19:9: error: not enough arguments
fixedbugs/issue7675.go:19:14: error: floating-point constant truncated to integer
fixedbugs/issue7675.go:21:11: error: argument 1 has incompatible type (cannot use type int as type string)
fixedbugs/issue7675.go:21:19: error: argument 3 has incompatible type
fixedbugs/issue7675.go:21:14: error: floating-point constant truncated to integer
fixedbugs/issue7675.go:23:14: error: floating-point constant truncated to integer

fixedbugs/issue7153.go:11:15: error: reference to undefined name ‘a’
fixedbugs/issue7153.go:11:18: error: incompatible type for element 1 in composite literal
fixedbugs/issue7153.go:11:24: error: incompatible type for element 2 in composite literal

fixedbugs/issue7310.go:12:13: error: left argument must be a slice
fixedbugs/issue7310.go:13:13: error: second argument must be slice or string
fixedbugs/issue7310.go:14:15: error: incompatible types in binary expression

fixedbugs/issue6964.go:10:13: error: invalid type conversion (cannot use type complex128 as type string)

fixedbugs/issue7538a.go:14:9: error: reference to undefined label ‘_’

fixedbugs/issue8311.go:14:9: error: increment or decrement of non-numeric type

fixedbugs/issue8507.go:12:6: error: invalid recursive type ‘T’

fixedbugs/issue9521.go:16:20: error: argument 2 has incompatible type
fixedbugs/issue9521.go:17:20: error: argument 2 has incompatible type (cannot use type float64 as type int)

fixedbugs/issue8385.go:30:19: error: argument 1 has incompatible type (type has no methods)
fixedbugs/issue8385.go:30:14: error: not enough arguments
fixedbugs/issue8385.go:35:9: error: not enough arguments
fixedbugs/issue8385.go:36:9: error: not enough arguments
fixedbugs/issue8385.go:37:10: error: not enough arguments
fixedbugs/issue8385.go:38:10: error: not enough arguments
fixedbugs/issue8385.go:39:10: error: not enough arguments
fixedbugs/issue8385.go:40:10: error: not enough arguments
fixedbugs/issue8385.go:41:13: error: not enough arguments

fixedbugs/issue8438.go:13:23: error: incompatible type for element 1 in composite literal
fixedbugs/issue8438.go:14:22: error: incompatible type for element 1 in composite literal
fixedbugs/issue8438.go:15:23: error: incompatible type for element 1 in composite literal

fixedbugs/issue8440.go:10:9: error: reference to undefined name ‘n’

Change-Id: I5707aec7d3c9178c4f4d794d4827fc907b52efb3
Reviewed-on: https://go-review.googlesource.com/c/go/+/278032
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
48 files changed:
test/fixedbugs/issue25958.go
test/fixedbugs/issue26416.go
test/fixedbugs/issue26616.go
test/fixedbugs/issue26855.go
test/fixedbugs/issue27356.go
test/fixedbugs/issue27938.go
test/fixedbugs/issue28079b.go
test/fixedbugs/issue28079c.go
test/fixedbugs/issue28268.go
test/fixedbugs/issue28450.go
test/fixedbugs/issue28926.go
test/fixedbugs/issue29855.go
test/fixedbugs/issue29870b.go
test/fixedbugs/issue30085.go
test/fixedbugs/issue30087.go
test/fixedbugs/issue30722.go
test/fixedbugs/issue32723.go
test/fixedbugs/issue33308.go
test/fixedbugs/issue33386.go
test/fixedbugs/issue33460.go
test/fixedbugs/issue35291.go
test/fixedbugs/issue38745.go
test/fixedbugs/issue41247.go
test/fixedbugs/issue41440.go
test/fixedbugs/issue41500.go
test/fixedbugs/issue41575.go
test/fixedbugs/issue42058a.go
test/fixedbugs/issue42058b.go
test/fixedbugs/issue4215.go
test/fixedbugs/issue6402.go
test/fixedbugs/issue6403.go
test/fixedbugs/issue6772.go
test/fixedbugs/issue6889.go
test/fixedbugs/issue6964.go
test/fixedbugs/issue7129.go
test/fixedbugs/issue7150.go
test/fixedbugs/issue7153.go
test/fixedbugs/issue7310.go
test/fixedbugs/issue7538a.go
test/fixedbugs/issue7675.go
test/fixedbugs/issue7746.go
test/fixedbugs/issue7760.go
test/fixedbugs/issue8311.go
test/fixedbugs/issue8385.go
test/fixedbugs/issue8438.go
test/fixedbugs/issue8440.go
test/fixedbugs/issue8507.go
test/fixedbugs/issue9521.go

index ba7ee82230fcadf40f1e88b16ae1d8ad3c7c2af9..90fcee15fd0b900a1f6448df11a048793f4f7667 100644 (file)
@@ -11,7 +11,7 @@ package p
 
 func f(done chan struct{}) {
        select {
-       case done: // ERROR "must be receive", "not used"
-       case (chan struct{})(done): // ERROR "must be receive"
+       case done: // ERROR "must be receive|expected .*<-.* or .*=" "not used"
+       case (chan struct{})(done): // ERROR "must be receive|expected .*<-.* or .*="
        }
 }
index bc37fd9d3a8e9dd3cae015a93d193ce65cb19841..44a4fc73b777f152f4b1371e456b0527af8efe70 100644 (file)
@@ -21,7 +21,7 @@ type t3 struct {
 }
 
 var (
-       _ = t2{t1f1: 600} // ERROR "cannot use promoted field t1.t1f1 in struct literal of type t2"
-       _ = t3{t1f2: 800} // ERROR "cannot use promoted field t2.t1.t1f2 in struct literal of type t3"
-       _ = t3{t2f1: 900} // ERROR "cannot use promoted field t2.t2f1 in struct literal of type t3"
+       _ = t2{t1f1: 600} // ERROR "cannot use promoted field t1.t1f1 in struct literal of type t2|unknown field"
+       _ = t3{t1f2: 800} // ERROR "cannot use promoted field t2.t1.t1f2 in struct literal of type t3|unknown field"
+       _ = t3{t2f1: 900} // ERROR "cannot use promoted field t2.t2f1 in struct literal of type t3|unknown field"
 )
index e5565b68ca55aa9160d9625188f62dc038f6b21e..87c0293661f8ad8dadf1aa3f15ad8b2007d6c674 100644 (file)
@@ -6,13 +6,13 @@
 
 package p
 
-var x int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
+var x int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|multiple-value function call in single-value context"
 
 func f() {
-       var _ int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
-       var a int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
-       a = three()         // ERROR "assignment mismatch: 1 variable but three returns 3 values"
-       b := three()        // ERROR "assignment mismatch: 1 variable but three returns 3 values"
+       var _ int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|multiple-value function call in single-value context"
+       var a int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|multiple-value function call in single-value context"
+       a = three()         // ERROR "assignment mismatch: 1 variable but three returns 3 values|multiple-value function call in single-value context"
+       b := three()        // ERROR "assignment mismatch: 1 variable but three returns 3 values|single variable set to multiple-value|multiple-value function call in single-value context"
 
        _, _ = a, b
 }
index 144e4415f7fae6db07a3381beb0d491ce8919d83..b965635a65ce3ad9c585fe54aa9d02ba185f8aaa 100644 (file)
@@ -20,9 +20,9 @@ type P struct {
 type T struct{}
 
 var _ = S{
-       f: &T{}, // ERROR "cannot use &T{}"
+       f: &T{}, // ERROR "cannot use &T{}|incompatible type"
 }
 
 var _ = P{
-       f: T{}, // ERROR "cannot use T{}"
+       f: T{}, // ERROR "cannot use T{}|incompatible type"
 }
index 42784876a558a2624eff8413d576b0351fa799c3..c3e686df339544ff8f7b6954a35420a5ca310120 100644 (file)
@@ -11,9 +11,9 @@ package p
 var a = []int{1,2,3}
 
 func _(len int) {
-       _ =  len(a) // ERROR "cannot call non-function"
+       _ =  len(a) // ERROR "cannot call non-function|expected function"
 }
 
 var cap = false
-var _ = cap(a) // ERROR "cannot call non-function"
+var _ = cap(a) // ERROR "cannot call non-function|expected function"
 
index b0007be928361891142cffbd95ef3d9eb822a564..ed974e642df576a34a1fdfca8e7b55672eecf819 100644 (file)
 package p
 
 type _ struct {
-       F sync.Mutex // ERROR "undefined: sync"
+       F sync.Mutex // ERROR "undefined: sync|expected package"
 }
 
 type _ struct {
-       sync.Mutex // ERROR "undefined: sync"
+       sync.Mutex // ERROR "undefined: sync|expected package"
 }
 
 type _ interface {
-       sync.Mutex // ERROR "undefined: sync"
+       sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name"
 }
index 47cc16dfb2f6c9bb12f9fe39d3349bdfe775f301..d1992e1d0942aa337deb2cdea13f245962094a4a 100644 (file)
@@ -10,8 +10,8 @@ package p
 
 import "unsafe"
 
-type T [uintptr(unsafe.Pointer(nil))]int // ERROR "non-constant array bound"
+type T [uintptr(unsafe.Pointer(nil))]int // ERROR "non-constant array bound|array bound is not constant"
 
 func f() {
-       _ = complex(1<<uintptr(unsafe.Pointer(nil)), 0)
+       _ = complex(1<<uintptr(unsafe.Pointer(nil)), 0) // GCCGO_ERROR "non-integer type for left operand of shift"
 }
index bea1898304b845642bfb550f39b2d82110daaf44..dfac8d01554737f8ebdc93f51b522a562479a272 100644 (file)
@@ -11,5 +11,5 @@ package p
 import "unsafe"
 
 func f() {
-       _ = complex(1<<uintptr(unsafe.Pointer(nil)), 0) // ERROR "invalid operation: .*shift of type float64.*"
+       _ = complex(1<<uintptr(unsafe.Pointer(nil)), 0) // ERROR "invalid operation: .*shift of type float64.*|non-integer type for left operand of shift"
 }
index fdc6974d1c0fbd589b74885ca7a284005dae5b31..59a4c57c6727b35cda2538f139432a20c1571387 100644 (file)
@@ -16,8 +16,8 @@ type T struct {
 
 type E struct{}
 
-func (T) b()  {} // ERROR "field and method named b"
-func (*T) E() {} // ERROR "field and method named E"
+func (T) b()  {} // ERROR "field and method named b|redeclares struct field name"
+func (*T) E() {} // ERROR "field and method named E|redeclares struct field name"
 
 func _() {
        var x T
index 1a1183b2912f63c4b6501358e6d20a4c8ff206fd..2acfe39177a04d68b98eeb3ac772760beaab058c 100644 (file)
@@ -6,13 +6,13 @@
 
 package p
 
-func f(a, b, c, d ...int)       {} // ERROR "non-final parameter a"
-func g(a ...int, b ...int)      {} // ERROR "non-final parameter a"
-func h(...int, ...int, float32) {} // ERROR "non-final parameter"
+func f(a, b, c, d ...int)       {} // ERROR "non-final parameter a|only permits one name"
+func g(a ...int, b ...int)      {} // ERROR "non-final parameter a|must be last parameter"
+func h(...int, ...int, float32) {} // ERROR "non-final parameter|must be last parameter"
 
-type a func(...float32, ...interface{}) // ERROR "non-final parameter"
+type a func(...float32, ...interface{}) // ERROR "non-final parameter|must be last parameter"
 type b interface {
-       f(...int, ...int)                // ERROR "non-final parameter"
-       g(a ...int, b ...int, c float32) // ERROR "non-final parameter a"
+       f(...int, ...int)                // ERROR "non-final parameter|must be last parameter"
+       g(a ...int, b ...int, c float32) // ERROR "non-final parameter a|must be last parameter"
        valid(...int)
 }
index 5a46bd307c7fddeca57b88b161108e5c48a252df..1ca97d6f605862ea9d7971386da144c315a71040 100644 (file)
@@ -13,12 +13,12 @@ type Stringer interface {
 func main() {
        var e interface{}
        switch e := e.(type) {
-       case G: // ERROR "undefined: G"
+       case G: // ERROR "undefined: G|undefined type .*G"
                e.M() // ok: this error should be ignored because the case failed its typecheck
-       case E: // ERROR "undefined: E"
+       case E: // ERROR "undefined: E|undefined type .*E"
                e.D() // ok: this error should be ignored because the case failed its typecheck
        case Stringer:
                // ok: this error should not be ignored to prove that passing legs aren't left out
-               _ = e.(T) // ERROR "undefined: T"
+               _ = e.(T) // ERROR "undefined: T|undefined type .*T"
        }
 }
index b57eae2b44fea342663497ce0a71fee4ad5c8664..402093c160257ce9a0b7c52e0a5c32dfe015c251 100644 (file)
@@ -10,7 +10,7 @@ type T struct {
        GlobalName string
 }
 
-var t = T{Name: "foo"} // ERROR "unknown field 'Name' in struct literal of type T"
+var t = T{Name: "foo"} // ERROR "unknown field 'Name' in struct literal of type T|unknown field .*Name.* in .*T"
 
 func (t T) Name() string {
        return t.GlobalName
index 2d5f638530cb46d88c3a110598dc24185bcbed15..0a83489d96322f3d1005b99048ba03c553da1821 100644 (file)
@@ -10,5 +10,5 @@
 package main
 
 func _() {
-       x := 7 // ERROR "x declared but not used"
+       x := 7 // ERROR ".*x.* declared but not used"
 }
index 8223c855cd04fc0f5a71042331ff7a47bde1f169..d2ac4cfbfa7a06bb598fb4b7e20d9aa4799a61eb 100644 (file)
@@ -7,6 +7,6 @@
 package main
 
 func main() {
-       var c, d = 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values"
-       var e, f, g = 1, 2 // ERROR "assignment mismatch: 3 variables but 2 values"
+       var c, d = 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values|wrong number of initializations"
+       var e, f, g = 1, 2 // ERROR "assignment mismatch: 3 variables but 2 values|wrong number of initializations"
 }
index dc12364d80fd23479b07b03a475de2fdff93bd4b..3ad9c8c8d90c0c32479a5d48b1bf72845df19171 100644 (file)
@@ -7,8 +7,8 @@
 package main
 
 func main() {
-       var a, b = 1    // ERROR "assignment mismatch: 2 variables but 1 values"
-       _ = 1, 2        // ERROR "assignment mismatch: 1 variables but 2 values"
-       c, d := 1       // ERROR "assignment mismatch: 2 variables but 1 values"
-       e, f := 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values"
+       var a, b = 1    // ERROR "assignment mismatch: 2 variables but 1 values|wrong number of initializations"
+       _ = 1, 2        // ERROR "assignment mismatch: 1 variables but 2 values|number of variables does not match"
+       c, d := 1       // ERROR "assignment mismatch: 2 variables but 1 values|wrong number of initializations"
+       e, f := 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values|wrong number of initializations"
 }
index 02258f0bea9a3a4c76570b22dd728b540d19b564..fe04c8f41a0c31e3cd9629a6da787eb664009ab5 100644 (file)
@@ -10,8 +10,8 @@ package p
 
 const (
        _ = 1_       // ERROR "'_' must separate successive digits"
-       _ = 0b       // ERROR "binary literal has no digits"
-       _ = 0o       // ERROR "octal literal has no digits"
-       _ = 0x       // ERROR "hexadecimal literal has no digits"
+       _ = 0b       // ERROR "binary literal has no digits|invalid numeric literal"
+       _ = 0o       // ERROR "octal literal has no digits|invalid numeric literal"
+       _ = 0x       // ERROR "hexadecimal literal has no digits|invalid numeric literal"
        _ = 0xde__ad // ERROR "'_' must separate successive digits"
 )
index 7d9e403fc0cfd6089393d78ce3d7b80868dbce69..850334d7024ef454e90e3630e97baae5e4a8a0ec 100644 (file)
@@ -9,14 +9,14 @@
 package p
 
 const x = 1i
-const y = 1i < 2i // ERROR "invalid operation: .*not defined on untyped complex"
-const z = x < 2i  // ERROR "invalid operation: .*not defined on untyped complex"
+const y = 1i < 2i // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
+const z = x < 2i  // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
 
 func f() {
-       _ = 1i < 2i // ERROR "invalid operation: .*not defined on untyped complex"
-       _ = 1i < 2  // ERROR "invalid operation: .*not defined on untyped complex"
-       _ = 1 < 2i  // ERROR "invalid operation: .*not defined on untyped complex"
+       _ = 1i < 2i // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
+       _ = 1i < 2  // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
+       _ = 1 < 2i  // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
 
        c := 1i
-       _ = c < 2i // ERROR "invalid operation: .*not defined on complex128"
+       _ = c < 2i // ERROR "invalid operation: .*not defined on complex128|non-ordered type"
 }
index b0fd6a450ca4e2e9feb0a81cff4b9225f089f279..5821099e3d36599e3944e2cce841709b0bdc8403 100644 (file)
@@ -9,4 +9,4 @@
 package p
 
 var v uint
-var x = []byte((1 << v) + 1) // ERROR "cannot convert"
+var x = []byte((1 << v) + 1) // ERROR "cannot convert|non-integer type for left operand of shift"
index afc27e62f35cc7dd14cb9f94c9c833dbea646651..7b2f565285e6f8290979fcd69d4dcc830b08c9d9 100644 (file)
 package p
 
 func _() {
-       go func() { // no error here about goroutine
-               send <-
-       }() // ERROR "expecting expression"
+       go func() {     // no error here about goroutine
+               send <- // GCCGO_ERROR "undefined name"
+       }()             // ERROR "expecting expression|expected operand"
 }
 
 func _() {
        defer func() { // no error here about deferred function
-               1 +
-       }() // ERROR "expecting expression"
+               1 +    // GCCGO_ERROR "value computed is not used"
+       }()            // ERROR "expecting expression|expected operand"
 }
 
 func _() {
-       _ = (1 +)             // ERROR "expecting expression"
-       _ = a[2 +]            // ERROR "expecting expression"
-       _ = []int{1, 2, 3 + } // ERROR "expecting expression"
+       _ = (1 +)             // ERROR "expecting expression|expected operand"
+       _ = a[2 +]            // ERROR "expecting expression|expected operand|undefined name"
+       _ = []int{1, 2, 3 + } // ERROR "expecting expression|expected operand"
 }
index 1061d3e746c26fbb9e60a87196e3c1fd6f530315..d90b0a43489d4baf66681f789cef1f0f9e065abb 100644 (file)
@@ -18,11 +18,11 @@ const iii int = 0x3
 func f(v int) {
        switch v {
        case zero, one:
-       case two, one: // ERROR "previous case at LINE-1"
+       case two, one: // ERROR "previous case at LINE-1|duplicate case in switch"
 
        case three:
-       case 3: // ERROR "previous case at LINE-1"
-       case iii: // ERROR "previous case at LINE-2"
+       case 3: // ERROR "previous case at LINE-1|duplicate case in switch"
+       case iii: // ERROR "previous case at LINE-2|duplicate case in switch"
        }
 }
 
@@ -31,7 +31,7 @@ const b = "b"
 var _ = map[string]int{
        "a": 0,
        b:   1,
-       "a": 2, // ERROR "previous key at LINE-2"
-       "b": 3, // ERROR "previous key at LINE-2"
-       "b": 4, // ERROR "previous key at LINE-3"
+       "a": 2, // ERROR "previous key at LINE-2|duplicate key in map literal"
+       "b": 3, // GC_ERROR "previous key at LINE-2"
+       "b": 4, // GC_ERROR "previous key at LINE-3"
 }
index 3cbdbf962aac1824c0af99fb6ec5e8bbbc20a4e6..5d8381c244e3e663edd36c58b03e6293cc9ddd40 100644 (file)
@@ -10,5 +10,5 @@ package p
 
 var s = []string{
        1: "dup",
-       1: "dup", // ERROR "duplicate index in slice literal: 1"
+       1: "dup", // ERROR "duplicate index in slice literal: 1|duplicate value for index 1"
 }
index 83a3bc6fad6e0181fa9d3d008695fbf7b0b846fc..7d4283b8453ddfc0d5e2dc9bf61b3876ab2a60b0 100644 (file)
@@ -9,10 +9,10 @@ package p
 type t struct{ x int }
 
 func f1() {
-       t{}.M()     // ERROR "t{}.M undefined \(type t has no field or method M\)"
-       t{x: 1}.M() // ERROR "t{...}.M undefined \(type t has no field or method M\)"
+       t{}.M()     // ERROR "t{}.M undefined \(type t has no field or method M\)|undefined field or method .*M"
+       t{x: 1}.M() // ERROR "t{...}.M undefined \(type t has no field or method M\)|undefined field or method .*M"
 }
 
 func f2() (*t, error) {
-       return t{}.M() // ERROR "t{}.M undefined \(type t has no field or method M\)"
+       return t{}.M() // ERROR "t{}.M undefined \(type t has no field or method M\)|undefined field or method .*M|not enough arguments"
 }
index b8bd81274f8526162f9c1551d540a551161606b1..c5e495ba93396cef9dfe6c99444d7825a08a3329 100644 (file)
@@ -7,5 +7,5 @@
 package p
 
 func f() [2]int {
-       return [...]int{2: 0} // ERROR "cannot use \[\.\.\.\]int{...} \(type \[3\]int\)"
+       return [...]int{2: 0} // ERROR "cannot use \[\.\.\.\]int{...} \(type \[3\]int\)|incompatible type"
 }
index 2b441db8037f7f8f7a59e5d97fad8b6eb2021624..0d911f0173a480ca4ceaf7b8fa725afc2030017a 100644 (file)
@@ -10,5 +10,5 @@ func f(...int) {}
 
 func g() {
        var x []int
-       f(x, x...) // ERROR "have \(\[\]int, \.\.\.int\)"
+       f(x, x...) // ERROR "have \(\[\]int, \.\.\.int\)|too many arguments"
 }
index d1e4efc8fd9f0d9bfce0d46e8b3689aa10bf1c24..82dca34820a37726d102fe70e13bbae8afbce244 100644 (file)
@@ -13,8 +13,8 @@ type s struct {
 func f() {
        var x *s
 
-       _ = x == nil || len(x.slice) // ERROR "invalid operation: .+ \(operator \|\| not defined on int\)"
-       _ = len(x.slice) || x == nil // ERROR "invalid operation: .+ \(operator \|\| not defined on int\)"
-       _ = x == nil && len(x.slice) // ERROR "invalid operation: .+ \(operator && not defined on int\)"
-       _ = len(x.slice) && x == nil // ERROR "invalid operation: .+ \(operator && not defined on int\)"
+       _ = x == nil || len(x.slice) // ERROR "invalid operation: .+ \(operator \|\| not defined on int\)|incompatible types"
+       _ = len(x.slice) || x == nil // ERROR "invalid operation: .+ \(operator \|\| not defined on int\)|incompatible types"
+       _ = x == nil && len(x.slice) // ERROR "invalid operation: .+ \(operator && not defined on int\)|incompatible types"
+       _ = len(x.slice) && x == nil // ERROR "invalid operation: .+ \(operator && not defined on int\)|incompatible types"
 }
index d03d1c8b3ea63f9acbaad1e648d01185e4f0a683..456873038fc891c8e2d60deebe5cbc368f96aa51 100644 (file)
@@ -6,31 +6,31 @@
 
 package p
 
-type T1 struct { // ERROR "invalid recursive type T1\n\tLINE: T1 refers to\n\tLINE+4: T2 refers to\n\tLINE: T1$"
+type T1 struct { // ERROR "invalid recursive type T1\n\tLINE: T1 refers to\n\tLINE+4: T2 refers to\n\tLINE: T1$|invalid recursive type"
        f2 T2
 }
 
-type T2 struct {
+type T2 struct { // GCCGO_ERROR "invalid recursive type"
        f1 T1
 }
 
-type a b
-type b c // ERROR "invalid recursive type b\n\tLINE: b refers to\n\tLINE+1: c refers to\n\tLINE: b$"
-type c b
+type a b // GCCGO_ERROR "invalid recursive type"
+type b c // ERROR "invalid recursive type b\n\tLINE: b refers to\n\tLINE+1: c refers to\n\tLINE: b$|invalid recursive type"
+type c b // GCCGO_ERROR "invalid recursive type"
 
 type d e
 type e f
-type f f // ERROR "invalid recursive type f\n\tLINE: f refers to\n\tLINE: f$"
+type f f // ERROR "invalid recursive type f\n\tLINE: f refers to\n\tLINE: f$|invalid recursive type"
 
-type g struct { // ERROR "invalid recursive type g\n\tLINE: g refers to\n\tLINE: g$"
+type g struct { // ERROR "invalid recursive type g\n\tLINE: g refers to\n\tLINE: g$|invalid recursive type"
        h struct {
                g
        }
 }
 
 type w x
-type x y // ERROR "invalid recursive type x\n\tLINE: x refers to\n\tLINE+1: y refers to\n\tLINE+2: z refers to\n\tLINE: x$"
-type y struct{ z }
+type x y           // ERROR "invalid recursive type x\n\tLINE: x refers to\n\tLINE+1: y refers to\n\tLINE+2: z refers to\n\tLINE: x$|invalid recursive type"
+type y struct{ z } // GCCGO_ERROR "invalid recursive type"
 type z [10]x
 
 type w2 w // refer to the type loop again
index 67751a1b0c9656df8e977532a0dc1ea7372f36cd..722f86e1ecfdc16ec790fd4d37d33d1a28a01fdf 100644 (file)
@@ -6,8 +6,8 @@
 
 package p
 
-var c chan [2 << 16]byte // ERROR "channel element type too large"
+var c chan [2 << 16]byte // GC_ERROR "channel element type too large"
 
 type T [1 << 17]byte
 
-var x chan T // ERROR "channel element type too large"
+var x chan T // GC_ERROR "channel element type too large"
index 03f86ee1b114b5688c6ab4dbac812a6e6036aa44..71a280f96b74ba2a0687ed1495b974a1336dca21 100644 (file)
@@ -6,7 +6,7 @@
 
 package p
 
-var c chan [2 << 16]byte // ERROR "channel element type too large"
+var c chan [2 << 16]byte // GC_ERROR "channel element type too large"
 
 func f() {
        _ = 42
index 795d48d7f557c552025bac9c0b92676ff6f4f8a1..be9fc7434a7d45e28827d9b18998811a1fef4e23 100644 (file)
@@ -7,28 +7,28 @@
 package main
 
 func foo() (int, int) {
-       return 2.3 // ERROR "not enough arguments to return\n\thave \(number\)\n\twant \(int, int\)"
+       return 2.3 // ERROR "not enough arguments to return\n\thave \(number\)\n\twant \(int, int\)|not enough arguments to return"
 }
 
 func foo2() {
-       return int(2), 2 // ERROR "too many arguments to return\n\thave \(int, number\)\n\twant \(\)"
+       return int(2), 2 // ERROR "too many arguments to return\n\thave \(int, number\)\n\twant \(\)|return with value in function with no return type"
 }
 
 func foo3(v int) (a, b, c, d int) {
        if v >= 0 {
-               return 1 // ERROR "not enough arguments to return\n\thave \(number\)\n\twant \(int, int, int, int\)"
+               return 1 // ERROR "not enough arguments to return\n\thave \(number\)\n\twant \(int, int, int, int\)|not enough arguments to return"
        }
-       return 2, 3 // ERROR "not enough arguments to return\n\thave \(number, number\)\n\twant \(int, int, int, int\)"
+       return 2, 3 // ERROR "not enough arguments to return\n\thave \(number, number\)\n\twant \(int, int, int, int\)|not enough arguments to return"
 }
 
 func foo4(name string) (string, int) {
        switch name {
        case "cow":
-               return "moo" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(string, int\)"
+               return "moo" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(string, int\)|not enough arguments to return"
        case "dog":
-               return "dog", 10, true // ERROR "too many arguments to return\n\thave \(string, number, bool\)\n\twant \(string, int\)"
+               return "dog", 10, true // ERROR "too many arguments to return\n\thave \(string, number, bool\)\n\twant \(string, int\)|too many values in return statement"
        case "fish":
-               return "" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(string, int\)"
+               return "" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(string, int\)|not enough arguments to return"
        default:
                return "lizard", 10
        }
@@ -40,14 +40,14 @@ type U float64
 
 func foo5() (S, T, U) {
        if false {
-               return "" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(S, T, U\)"
+               return "" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(S, T, U\)|not enough arguments to return"
        } else {
                ptr := new(T)
-               return ptr // ERROR "not enough arguments to return\n\thave \(\*T\)\n\twant \(S, T, U\)"
+               return ptr // ERROR "not enough arguments to return\n\thave \(\*T\)\n\twant \(S, T, U\)|not enough arguments to return"
        }
-       return new(S), 12.34, 1 + 0i, 'r', true // ERROR "too many arguments to return\n\thave \(\*S, number, number, number, bool\)\n\twant \(S, T, U\)"
+       return new(S), 12.34, 1 + 0i, 'r', true // ERROR "too many arguments to return\n\thave \(\*S, number, number, number, bool\)\n\twant \(S, T, U\)|too many values in return statement"
 }
 
 func foo6() (T, string) {
-       return "T", true, true // ERROR "too many arguments to return\n\thave \(string, bool, bool\)\n\twant \(T, string\)"
+       return "T", true, true // ERROR "too many arguments to return\n\thave \(string, bool, bool\)\n\twant \(T, string\)|too many values in return statement"
 }
index da5980c9ab6a601ad2afddc959edbedacea261b5..ecde9ae5105c88ea7564584ca253525e6926e198 100644 (file)
@@ -9,5 +9,5 @@
 package p
 
 func f() uintptr {
-       return nil // ERROR "cannot use nil as type uintptr in return argument"
+       return nil // ERROR "cannot use nil as type uintptr in return argument|incompatible type"
 }
index b61e2e225d4859d9b3bee5b167d301c75b26c734..809efefa0f42c5c21def82d3db8dae784ddf0b4a 100644 (file)
@@ -10,5 +10,5 @@ package p
 
 import "syscall"
 
-const A int = syscall.X // ERROR "undefined: syscall.X"
-const B int = voidpkg.X // ERROR "undefined: voidpkg"
+const A int = syscall.X // ERROR "undefined: syscall.X|undefined identifier .*syscall.X"
+const B int = voidpkg.X // ERROR "undefined: voidpkg|undefined name .*voidpkg"
index 4d0001c870d7a5fd62749d2cf9a70a1e5d56345d..5bd15ba72ece24fead41e144f48293c86ea3acee 100644 (file)
@@ -7,14 +7,14 @@
 package p
 
 func f1() {
-       for a, a := range []int{1, 2, 3} { // ERROR "a repeated on left side of :="
+       for a, a := range []int{1, 2, 3} { // ERROR "a.* repeated on left side of :="
                println(a)
        }
 }
 
 func f2() {
        var a int
-       for a, a := range []int{1, 2, 3} { // ERROR "a repeated on left side of :="
+       for a, a := range []int{1, 2, 3} { // ERROR "a.* repeated on left side of :="
                println(a)
        }
        println(a)
index 805a877d582728389fc630aae40e71191364fcf0..efd8b761483410ba3561c2a2ce44b635b9e66556 100644 (file)
@@ -107,5 +107,5 @@ const (
        f96 = f95 * 96
        f97 = f96 * 97
        f98 = f97 * 98
-       f99 = f98 * 99 // ERROR "overflow"
+       f99 = f98 * 99 // GC_ERROR "overflow"
 )
index 7ad83364ab0bdbf0637aac01a3c8946f613db743..36a3c5bb40f27245315ce700fe19af761b28b1d5 100644 (file)
@@ -7,5 +7,5 @@
 package main
 
 func main() {
-       _ = string(-4 + 2i + 2) // ERROR "-4 \+ 2i"
+       _ = string(-4 + 2i + 2) // ERROR "-4 \+ 2i|invalid type conversion"
 }
index 2425cbd3439ede2e15a56450c12cf28198703e64..2765200ac89fcff5045068fa2cb4f0418c21eaa6 100644 (file)
@@ -15,7 +15,7 @@ func g() bool { return true }
 func h(int, int) {}
 
 func main() {
-       f(g())        // ERROR "in argument to f"
-       f(true)       // ERROR "in argument to f"
-       h(true, true) // ERROR "in argument to h"
+       f(g())        // ERROR "in argument to f|incompatible type"
+       f(true)       // ERROR "in argument to f|incompatible type"
+       h(true, true) // ERROR "in argument to h|incompatible type"
 }
index 8a8a7d088fc8f540b60d12eac2a2b2584dd2e6b0..7cddf4875eb3ddaeea2104608c29f3a18b30cafd 100644 (file)
@@ -9,9 +9,9 @@
 package main
 
 func main() {
-       _ = [0]int{-1: 50}              // ERROR "index must be non-negative integer constant"
-       _ = [0]int{0: 0}                // ERROR "index 0 out of bounds \[0:0\]"
-       _ = [0]int{5: 25}               // ERROR "index 5 out of bounds \[0:0\]"
-       _ = [10]int{2: 10, 15: 30}      // ERROR "index 15 out of bounds \[0:10\]"
-       _ = [10]int{5: 5, 1: 1, 12: 12} // ERROR "index 12 out of bounds \[0:10\]"
+       _ = [0]int{-1: 50}              // ERROR "index must be non-negative integer constant|index expression is negative"
+       _ = [0]int{0: 0}                // ERROR "index 0 out of bounds \[0:0\]|out of range"
+       _ = [0]int{5: 25}               // ERROR "index 5 out of bounds \[0:0\]|out of range"
+       _ = [10]int{2: 10, 15: 30}      // ERROR "index 15 out of bounds \[0:10\]|out of range"
+       _ = [10]int{5: 5, 1: 1, 12: 12} // ERROR "index 12 out of bounds \[0:10\]|out of range"
 }
index 66b1338496f298658cf969ea5f2dcc4135b12604..e8b95d5db827a9a0155481be8a8401036606cd64 100644 (file)
@@ -8,4 +8,4 @@
 
 package p
 
-var _ = []int{a: true, true} // ERROR "undefined: a" "cannot use true \(type untyped bool\) as type int in slice literal"
+var _ = []int{a: true, true} // ERROR "undefined: a" "cannot use true \(type untyped bool\) as type int in slice literal|undefined name .*a|incompatible type"
index 6829d5e126bf343a956ff9d3ca6c2611c0d5ef8a..ba50e4237b38cd479cd016dc39d42929576cb0e7 100644 (file)
@@ -9,7 +9,7 @@
 package main
 
 func main() {
-       _ = copy(nil, []int{}) // ERROR "use of untyped nil"
-       _ = copy([]int{}, nil) // ERROR "use of untyped nil"
-       _ = 1 + true           // ERROR "mismatched types untyped int and untyped bool"
+       _ = copy(nil, []int{}) // ERROR "use of untyped nil|left argument must be a slice"
+       _ = copy([]int{}, nil) // ERROR "use of untyped nil|second argument must be slice or string"
+       _ = 1 + true           // ERROR "mismatched types untyped int and untyped bool|incompatible types"
 }
index 283d9eb1ba5089fff0ad216815de6e93ba8a1e70..b1701508d8cb180091f238230ceb4847abe6b108 100644 (file)
@@ -11,5 +11,5 @@ package p
 func f() {
 _:
 _:
-       goto _ // ERROR "not defined"
+       goto _ // ERROR "not defined|undefined label"
 }
index d97ee357a2257795795db6b821e8fc6172d22ceb..6cda05f332fc8986c93b00c6fdf32250beb0d780 100644 (file)
@@ -13,12 +13,12 @@ func f(string, int, float64, string)
 func g(string, int, float64, ...string)
 
 func main() {
-       f(1, 0.5, "hello") // ERROR "not enough arguments"
+       f(1, 0.5, "hello") // ERROR "not enough arguments|incompatible type"
        f("1", 2, 3.1, "4")
-       f(1, 0.5, "hello", 4, 5) // ERROR "too many arguments"
-       g(1, 0.5)                // ERROR "not enough arguments"
+       f(1, 0.5, "hello", 4, 5) // ERROR "too many arguments|incompatible type"
+       g(1, 0.5)                // ERROR "not enough arguments|incompatible type"
        g("1", 2, 3.1)
-       g(1, 0.5, []int{3, 4}...) // ERROR "not enough arguments"
+       g(1, 0.5, []int{3, 4}...) // ERROR "not enough arguments|incompatible type"
        g("1", 2, 3.1, "4", "5")
-       g(1, 0.5, "hello", 4, []int{5, 6}...) // ERROR "too many arguments"
+       g(1, 0.5, "hello", 4, []int{5, 6}...) // ERROR "too many arguments|truncated to integer"
 }
index 0dc119d2e6daed0a1591f4eebeb3c84e665fe0ff..745496293d719cdfdeb6a8f88676f98c4c607b66 100644 (file)
@@ -10,7 +10,7 @@ const (
        c0   = 1 << 100
        c1   = c0 * c0
        c2   = c1 * c1
-       c3   = c2 * c2 // ERROR "overflow"
+       c3   = c2 * c2 // GC_ERROR "overflow"
        c4   = c3 * c3
        c5   = c4 * c4
        c6   = c5 * c5
@@ -21,7 +21,7 @@ const (
        c11  = c10 * c10
        c12  = c11 * c11
        c13  = c12 * c12
-       c14  = c13 * c13
+       c14  = c13 * c13 // GCCGO_ERROR "overflow"
        c15  = c14 * c14
        c16  = c15 * c15
        c17  = c16 * c16
index cccae48910a70bfc86f044dae80edcca90edbed3..7e1d03596eb9808fd1e32265f717ffeae3386b37 100644 (file)
@@ -12,14 +12,14 @@ import "unsafe"
 
 type myPointer unsafe.Pointer
 
-const _ = unsafe.Pointer(uintptr(1)) // ERROR "is not (a )?constant"
-const _ = myPointer(uintptr(1)) // ERROR "is not (a )?constant"
+const _ = unsafe.Pointer(uintptr(1)) // ERROR "is not (a )?constant|invalid constant type"
+const _ = myPointer(uintptr(1)) // ERROR "is not (a )?constant|invalid constant type"
 
-const _ = (*int)(unsafe.Pointer(uintptr(1))) // ERROR "is not (a )?constant"
-const _ = (*int)(myPointer(uintptr(1))) // ERROR "is not (a )?constant"
+const _ = (*int)(unsafe.Pointer(uintptr(1))) // ERROR "is not (a )?constant|invalid constant type"
+const _ = (*int)(myPointer(uintptr(1))) // ERROR "is not (a )?constant|invalid constant type"
 
-const _ = uintptr(unsafe.Pointer(uintptr(1))) // ERROR "is not (a )?constant"
-const _ = uintptr(myPointer(uintptr(1))) // ERROR "is not (a )?constant"
+const _ = uintptr(unsafe.Pointer(uintptr(1))) // ERROR "is not (a )?constant|expression is not constant"
+const _ = uintptr(myPointer(uintptr(1))) // ERROR "is not (a )?constant|expression is no constant"
 
-const _ = []byte("") // ERROR "is not (a )?constant"
-const _ = []rune("") // ERROR "is not (a )?constant"
+const _ = []byte("") // ERROR "is not (a )?constant|invalid constant type"
+const _ = []rune("") // ERROR "is not (a )?constant|invalid constant type"
index 375b480a1738c4596ffa31286aaf2259e9c1149a..b5fd5daea1d7dd49ec20daabeb06350ab5c2cf8e 100644 (file)
@@ -11,6 +11,6 @@ package p
 
 func f() {
        var x []byte
-       x++ // ERROR "invalid operation: x[+][+]"
+       x++ // ERROR "invalid operation: x[+][+]|non-numeric type"
 
 }
index 6447e9f0e862924b865047f027e6f9ccc7fbd12a..f3d395e52175111f01a052b656929ed676c8acc9 100644 (file)
@@ -27,16 +27,16 @@ func (t T) M(x int) {
 func g() func(int)
 
 func main() {
-       Fooer.Foo(5, 6) // ERROR "not enough arguments in call to method expression Fooer.Foo"
+       Fooer.Foo(5, 6) // ERROR "not enough arguments in call to method expression Fooer.Foo|incompatible type|not enough arguments"
 
        var i I
        var t *T
 
-       g()()    // ERROR "not enough arguments in call to g\(\)"
-       f()      // ERROR "not enough arguments in call to f"
-       i.M()    // ERROR "not enough arguments in call to i\.M"
-       I.M()    // ERROR "not enough arguments in call to method expression I\.M"
-       t.M()    // ERROR "not enough arguments in call to t\.M"
-       T.M()    // ERROR "not enough arguments in call to method expression T\.M"
-       (*T).M() // ERROR "not enough arguments in call to method expression \(\*T\)\.M"
+       g()()    // ERROR "not enough arguments in call to g\(\)|not enough arguments"
+       f()      // ERROR "not enough arguments in call to f|not enough arguments"
+       i.M()    // ERROR "not enough arguments in call to i\.M|not enough arguments"
+       I.M()    // ERROR "not enough arguments in call to method expression I\.M|not enough arguments"
+       t.M()    // ERROR "not enough arguments in call to t\.M|not enough arguments"
+       T.M()    // ERROR "not enough arguments in call to method expression T\.M|not enough arguments"
+       (*T).M() // ERROR "not enough arguments in call to method expression \(\*T\)\.M|not enough arguments"
 }
index 3a4f193b57df33ee3f73413c70c42fc566bee210..f433e36924a38009690a9f1e77dd3fb96d2571e1 100644 (file)
@@ -10,8 +10,8 @@
 package main
 
 func main() {
-       _ = []byte{"foo"}   // ERROR "cannot use"
-       _ = []int{"foo"}    // ERROR "cannot use"
-       _ = []rune{"foo"}   // ERROR "cannot use"
+       _ = []byte{"foo"}   // ERROR "cannot use|incompatible type"
+       _ = []int{"foo"}    // ERROR "cannot use|incompatible type"
+       _ = []rune{"foo"}   // ERROR "cannot use|incompatible type"
        _ = []string{"foo"} // OK
 }
index f9b1dea3ebff209b985596d3c6bd0e8e2b413491..e9c5b54d51d2e1c8b4fd1563f025a75b5cc60678 100644 (file)
@@ -7,5 +7,5 @@
 package main
 
 func main() {
-       n.foo = 6 // ERROR "undefined: n in n.foo"
+       n.foo = 6 // ERROR "undefined: n in n.foo|undefined name .*n"
 }
index ad6ba8ac68b271f79262de47228d83b090620d03..392ecf406350a7abe01425c4ec3541ad82b0e011 100644 (file)
@@ -9,7 +9,7 @@
 
 package p
 
-type T struct{ T } // ERROR "invalid recursive type T"
+type T struct{ T } // ERROR "invalid recursive type .*T"
 
 func f() {
        println(T{} == T{})
index a33f0483f322862eef2ba5a9b2567909b7aff010..1ad40bdfda1ff5dca519efca6489fd375b9fcc42 100644 (file)
@@ -13,6 +13,6 @@ func f() (_, _ []int)         { return }
 func g() (x []int, y float64) { return }
 
 func main() {
-       _ = append(f()) // ERROR "cannot use \[\]int value as type int in append"
-       _ = append(g()) // ERROR "cannot use float64 value as type int in append"
+       _ = append(f()) // ERROR "cannot use \[\]int value as type int in append|incompatible type"
+       _ = append(g()) // ERROR "cannot use float64 value as type int in append|incompatible type"
 }