Commit 1a7b2032 authored by Sergio Costas's avatar Sergio Costas

Added test for FOR loop that doesn't free the block, but uses an alias to avoid error messages

parent 36df4cf5
......@@ -819,6 +819,9 @@ class Test(unittest.TestCase):
def test197ForLoopFreeing(self):
self._all_fine_test("unitest/test197.c")
def test198ForLoopWithoutFreeingWithAlias(self):
self._all_fine_test("unitest/test198.c")
if __name__ == '__main__':
try:
os.remove("error_list.txt")
......
#define NULL ((void *)0)
struct crust_ts {
char var1;
int var2;
struct crust_ts *next;
};
typedef __crust_t__ struct crust_ts* crust_t;
void function2(crust_t __crust_borrow__);
void function(crust_t var) {
crust_t __crust_alias__ tmp1;
for(tmp1 = var; tmp1 != NULL; tmp1 = tmp1->next) {
function2(tmp1);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment