aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata/errors3.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/errors3.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/errors3.txt')
-rw-r--r--pkg/compiler/testdata/errors3.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/errors3.txt b/pkg/compiler/testdata/errors3.txt
index 65bd20092..3221ee5dc 100644
--- a/pkg/compiler/testdata/errors3.txt
+++ b/pkg/compiler/testdata/errors3.txt
@@ -6,6 +6,9 @@
discrimination(a int32)
discrimination$1(a int16) ### discrimination$1 arg a is redeclared with size 2, previously declared with size 4 at LOCATION
+arg_size$1(a int16)
+arg_size$2(a const[0x12345]) ### const val 0x12345 does not fit into 16 bits
+
bad_size_attr_struct {
a int64
} [size[4]] ### struct bad_size_attr_struct has size attribute 4 which is less than struct size 8