From bf21057e7c36c72c1b46aa71bea8dc48509d4c40 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 29 Sep 2016 12:21:26 +0200 Subject: prog: add a test for union layout This is a retrospect tests for the union bug fixed in: 91eb1b922fd95bfaa5d8b0aad16902a73f3fe3d1 --- sys/test.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/test.txt b/sys/test.txt index 67e338a83..2fc41e677 100644 --- a/sys/test.txt +++ b/sys/test.txt @@ -14,12 +14,27 @@ syz_test$opt1(a0 ptr[in, intptr, opt]) syz_test$opt2(a0 vma[opt]) # Struct alignment. -syz_test$align0(a0 ptr[in, align0]) +syz_test$align0(a0 ptr[in, syz_align0]) -align0 { +syz_align0 { f0 int16 f1 int32 f2 int8 f3 int16 f4 int64 } + +# Unions. + +syz_test$union0(a0 ptr[in, syz_union_struct]) + +syz_union_struct { + f int64 + u syz_union0 +} + +syz_union0 [ + f0 int64 + f1 array[int64, 10] + f2 int8 +] -- cgit mrf-deployment