From 73117708e57864d65405d07928174803ec41844d Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Wed, 14 Mar 2018 23:51:51 +0100 Subject: [PATCH] Analyze generated code --- tests/tgen-marray.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/tgen-marray.c b/tests/tgen-marray.c index 335db0e6..4f7cff63 100644 --- a/tests/tgen-marray.c +++ b/tests/tgen-marray.c @@ -30,6 +30,7 @@ void size_to_exactly(array_uint_t tab, size_t n); void push_back (array_uint_t tab, unsigned int n); void unpop(array_uint_t tab); void unpop_if(array_uint_t tab, unsigned int x); +void construct(void *p); unsigned int add_two(const array_uint_t tab, size_t i, size_t j) { @@ -57,3 +58,13 @@ void unpop_if(array_uint_t tab, unsigned int x) if (x == *array_uint_back(tab)) array_uint_pop_back(NULL, tab); } + +array_uint_t global; +extern void f(void *p); +void construct(void *p) +{ + array_uint_it_t mark; + array_uint_it_end(mark, global); + f(p); + array_uint_pop_until(global, mark); +}