diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tests2/86-struct-init.c | 4 | ||||
| -rw-r--r-- | tests/tests2/86-struct-init.expect | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/tests2/86-struct-init.c b/tests/tests2/86-struct-init.c index 6ce4e24..3cf25c7 100644 --- a/tests/tests2/86-struct-init.c +++ b/tests/tests2/86-struct-init.c @@ -148,6 +148,9 @@ void foo (struct W *w, struct pkthdr *phdr_) struct V lv3 = {((struct S){7,8,{9,10}}), ((const struct W *)w)->t.t, 50}; const struct pkthdr *phdr = phdr_; struct flowi6 flow = { .daddr = phdr->daddr, .saddr = phdr->saddr }; + int elt = 0x42; + /* Range init, overlapping */ + struct T lt2 = { { [1 ... 5] = 9, [6 ... 10] = elt, [4 ... 7] = elt+1 }, 1 }; print(ls); print(ls2); print(lt); @@ -163,6 +166,7 @@ void foo (struct W *w, struct pkthdr *phdr_) print(lv); print(lv2); print(lv3); + print(lt2); print(flow); } #endif diff --git a/tests/tests2/86-struct-init.expect b/tests/tests2/86-struct-init.expect index b827ec4..1498a3d 100644 --- a/tests/tests2/86-struct-init.expect +++ b/tests/tests2/86-struct-init.expect @@ -33,4 +33,5 @@ ls3: 1 2 3 4 lv: 3 4 5 6 68 61 68 61 0 0 0 0 0 0 0 0 0 0 0 0 2d 2e lv2: 1 2 3 4 68 69 68 69 0 0 0 0 0 0 0 0 0 0 0 0 2f 30 lv3: 7 8 9 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32 +lt2: 0 9 9 9 43 43 43 43 42 42 42 0 0 0 0 0 1 flow: 9 8 7 6 0 0 0 0 0 0 0 0 0 0 0 0 6 5 4 3 0 0 0 0 0 0 0 0 0 0 0 0 |
