update .cvsignore, added a test to alloca
authorMatthias Braun <matze@braunis.de>
Tue, 5 Sep 2006 09:06:12 +0000 (09:06 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 5 Sep 2006 09:06:12 +0000 (09:06 +0000)
ir/be/test/.cvsignore
ir/be/test/alloca.c

index 20cd389..0aa4d65 100644 (file)
@@ -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
index 9ac9b61..54ff025 100644 (file)
@@ -7,22 +7,33 @@
 #include <stdio.h>
 
 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;
 }