From 42a0da5201d65d1413df3c8122d910169cd12cf5 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 5 Sep 2006 09:06:12 +0000 Subject: [PATCH] update .cvsignore, added a test to alloca --- ir/be/test/.cvsignore | 7 ++++++- ir/be/test/alloca.c | 25 ++++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ir/be/test/.cvsignore b/ir/be/test/.cvsignore index 20cd3895e..0aa4d652b 100644 --- a/ir/be/test/.cvsignore +++ b/ir/be/test/.cvsignore @@ -7,7 +7,12 @@ *.txt *.sh *.out +cachegrind.out* +build_firm +build_gcc +bla +res OUT.* gcc firm -Makefile.config \ No newline at end of file +Makefile.config diff --git a/ir/be/test/alloca.c b/ir/be/test/alloca.c index 9ac9b617b..54ff02509 100644 --- a/ir/be/test/alloca.c +++ b/ir/be/test/alloca.c @@ -7,22 +7,33 @@ #include struct x { - int a, b; + int a, b; }; static void t(struct x *p) { - printf("%d\n", p->a + p->b); + printf("%d\n", p->a + p->b); +} + +static void t2() +{ + char *mem; + + printf("hallo\n"); + mem = alloca(23); + + printf("%.0s", mem); } int main(int argc, char *argv[]) { - struct x *p = alloca(sizeof(*p)); + struct x *p = alloca(sizeof(*p)); - p->a = argc; - p->b = 3; + p->a = argc; + p->b = 3; - t(p); + t(p); + t2(); - return 0; + return 0; } -- 2.20.1