aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata/errors2.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-17 14:32:13 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-17 21:19:13 +0100
commit2e9037c55f6a3308190ab4eb0ce110dddc7a6f2b (patch)
tree7f97740e9d496a53a990d88a41405e67b8d4af44 /pkg/compiler/testdata/errors2.txt
parent0bcbb36f9fff81ac0bff9ec0959b9ea4c444a700 (diff)
pkg/compiler: check that const values fit into base type
const[0x12345678, int8] is always an error, detect these cases. Found some bugs in mptcp, socket proto and fuchsia fidl descriptions.
Diffstat (limited to 'pkg/compiler/testdata/errors2.txt')
-rw-r--r--pkg/compiler/testdata/errors2.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/errors2.txt b/pkg/compiler/testdata/errors2.txt
index 2b24d3628..4ec52d6cb 100644
--- a/pkg/compiler/testdata/errors2.txt
+++ b/pkg/compiler/testdata/errors2.txt
@@ -270,6 +270,10 @@ foo$526(a int8[-255:255]) ### int range [18446744073709551361:255] is too large
foo$527(a int16[-40000:40000]) ### int range [18446744073709511616:40000] is too large for base type of size 16
foo$528(a ptr[in, s405])
foo$529(a ptr[in, string[`abcdde`, 3]]) ### string value "\xab\xcd\xde\x00" exceeds buffer length 3
+foo$530(a ptr[in, const[0x1ab, int8]]) ### const val 0x1ab does not fit into 8 bits
+foo$531(a ptr[in, const[0xffffffffffffffab, int8]])
+foo$532(a ptr[in, const[0x7234567812345678, int64]])
+foo$533(a ptr[in, const[0x12, int8:4]]) ### const val 0x12 does not fit into 4 bits
type type500 proc[C1, 8, int8] ### values starting from 1 with step 8 overflow base type for 32 procs
type type501 int8 ### unused type type501