From ca9c302d807f47a55552d0a20a2dfcdb0fcc6e28 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 24 Jan 2018 11:35:22 +0100 Subject: pkg/compiler, prog: fix template parent lens It's possible that a struct can have 2+ parents, which is the same template (differs only by arguments). See the new test case. Support such case. --- sys/test/test.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sys/test/test.txt') diff --git a/sys/test/test.txt b/sys/test/test.txt index 051c17ce6..b5b1fecf0 100644 --- a/sys/test/test.txt +++ b/sys/test/test.txt @@ -350,6 +350,22 @@ type len_temp2[DATA] { syz_test$length23(a ptr[in, len_templ1[int8, int16]]) +type len_temp3[DATA] { + f1 DATA + f2 len_nontemp4 +} + +len_nontemp4 { + f1 len[len_temp3, int32] +} + +len_nontemp5 { + f1 len_temp3[int8] + f2 len_temp3[int64] +} + +syz_test$length24(a ptr[in, len_nontemp5]) + # Big endian syz_test$end0(a0 ptr[in, syz_end_int_struct]) -- cgit mrf-deployment