From dbb49d02117ee51e0a77de6e935600eb005cb804 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 4 Sep 2017 19:53:02 +0200 Subject: pkg/compiler: prohibit arrays of size 0 This is pointless and the only case that can yield 0 static type size. --- pkg/compiler/testdata/errors.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/compiler/testdata') diff --git a/pkg/compiler/testdata/errors.txt b/pkg/compiler/testdata/errors.txt index c339dcb80..629c2c864 100644 --- a/pkg/compiler/testdata/errors.txt +++ b/pkg/compiler/testdata/errors.txt @@ -110,6 +110,9 @@ foo$45(a int32) len[b] ### len can't be syscall return foo$46(a ptr[in, in]) ### unknown type in foo$47(a int32:2) ### unexpected ':', only struct fields can be bitfields foo$48(a ptr[in, int32:7]) ### unexpected ':', only struct fields can be bitfields +foo$49(a ptr[in, array[int32, 0:1]]) +foo$50(a ptr[in, array[int32, 0]]) ### arrays of size 0 are not supported +foo$51(a ptr[in, array[int32, 0:0]]) ### arrays of size 0 are not supported opt { ### struct uses reserved name opt f1 int32 -- cgit mrf-deployment