From bdafe73ce4f4910efd71eb5fdd7a5fc4614a9afe Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 27 Sep 2013 20:38:52 -0700 Subject: [PATCH] test: recognize gccgo error message in index.go When a floating point constant is used as an array/slice index, gccgo prints "error: index must be integer"; gc prints "constant 2.1 truncated to integer". R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/14044044 --- test/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.go b/test/index.go index f9360c10285..a8c471bb3bf 100644 --- a/test/index.go +++ b/test/index.go @@ -164,7 +164,7 @@ func testExpr(b *bufio.Writer, expr string) { if pass == 0 { fmt.Fprintf(b, "\ttest(func(){use(%s)}, %q)\n", expr, expr) } else { - fmt.Fprintf(b, "\tuse(%s) // ERROR \"index|overflow|truncated\"\n", expr) + fmt.Fprintf(b, "\tuse(%s) // ERROR \"index|overflow|truncated|must be integer\"\n", expr) } }