Several bug fixes
[libfirm] / ir / be / test / alloca.c
1 #ifdef _WIN32
2 #include <malloc.h>
3 #else
4 #include <alloca.h>
5 #endif
6
7 #include <stdio.h>
8
9 struct x {
10   int a, b;
11 };
12
13 static void t(struct x *p)
14 {
15   printf("%d\n", p->a + p->b);
16 }
17
18 int main(int argc, char *argv[])
19 {
20   struct x *p = alloca(sizeof(*p));
21
22   p->a = argc;
23   p->b = 3;
24
25   t(p);
26
27   return 0;
28 }