From a3e28c60b97fd96182727715ba15ed0cc713597a Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 3 Dec 2011 16:49:16 +0000 Subject: Correct array initialization, add testcase --- tests/array-global.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/array-global.c (limited to 'tests/array-global.c') diff --git a/tests/array-global.c b/tests/array-global.c new file mode 100644 index 0000000..6af2216 --- /dev/null +++ b/tests/array-global.c @@ -0,0 +1,8 @@ +int n = 4; +int a[] = {5, 4, 3, 2}; +int one[1] = {0, 2}; +int two[2] = {9, 8}; +int main(){ + // Should return 5 + 8 = 13 (0xd) + return *a + two[1]; +} -- cgit v1.2.1