From e29b2b00691b12ae70e97a072664bad073d81c4f Mon Sep 17 00:00:00 2001 From: Matthew Sotoudeh Date: Wed, 26 Jul 2023 11:02:15 -0700 Subject: initial libdietc --- python/examples/test_files/zero_init.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 python/examples/test_files/zero_init.c (limited to 'python/examples/test_files/zero_init.c') diff --git a/python/examples/test_files/zero_init.c b/python/examples/test_files/zero_init.c new file mode 100644 index 0000000..5db109a --- /dev/null +++ b/python/examples/test_files/zero_init.c @@ -0,0 +1,20 @@ +#include + +int set_xyz() { + int xyz = 1; + return xyz; +} + +int foo() { + int xyz; + return xyz; +} + +int main() { + printf("Foo return value: %d\n", foo()); + set_xyz(); + printf("Foo return value: %d\n", foo()); + set_xyz(); + printf("Foo return value: %d\n", foo()); + return 0; +} -- cgit v1.2.3