Daily bump.
[official-gcc.git] / gcc / testsuite / go.dg / arrayclear.go
blobaa5ba0761d70106b2c5f4b75c63346dea70b0e80
1 // { dg-do compile }
2 // { dg-options "-fgo-debug-optimization" }
3 // This comment is necessary to work around a dejagnu bug. Otherwise, the
4 // column of the second error message would equal the row of the first one, and
5 // since the errors are also identical, dejagnu is not able to distinguish them.
7 package p
9 var a [10]int
11 func arrayClear() {
12 for i := range a { // { dg-error "array range clear" }
13 a[i] = 0
17 var s []int
19 func sliceClear() {
20 for i := range s { // { dg-error "array range clear" }
21 s[i] = 0