From 4ccb5662cbfbf3e8c58a1b642fd3446fcce55e16 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Tue, 12 Jul 2011 15:10:59 +0200 Subject: [PATCH] Fix array_test: move params to local vars array_test is declared and called with no parameters but defined with one parameter. Compilation succeed (definition is after the use so the compiler consider the declaration) as well as link (the function exist and has the right name) but running the test segfault on i386 platforms. This patch moves the parameter to local variable. If the intention was to call it with an array parameter then feel free to fix it again. --- tests/tcctest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tcctest.c b/tests/tcctest.c index 629bcaa..92f239e 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -615,9 +615,9 @@ void scope_test() printf("g5=%d\n", g); } -void array_test(int a[4]) +void array_test() { - int i, j; + int i, j, a[4]; printf("array:\n"); printf("sizeof(a) = %d\n", sizeof(a));