From: Matthias Braun Date: Tue, 5 Sep 2006 09:06:12 +0000 (+0000) Subject: update .cvsignore, added a test to alloca X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=42a0da5201d65d1413df3c8122d910169cd12cf5;p=libfirm update .cvsignore, added a test to alloca --- 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; }