X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Ftest%2Falloca.c;h=54ff02509d87d7e1a8749b068b6e396a7b267288;hb=229d30467997f28acce39c2dcfc995eda29994de;hp=ecdd0f637a1107139c1ca37bdc7d5a6e7e678f26;hpb=e4691fe2e5046a9b2ae912e23e92ddcdcd2bb6e9;p=libfirm diff --git a/ir/be/test/alloca.c b/ir/be/test/alloca.c index ecdd0f637..54ff02509 100644 --- a/ir/be/test/alloca.c +++ b/ir/be/test/alloca.c @@ -1,21 +1,39 @@ +#ifdef _WIN32 +#include +#else #include +#endif + #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); + t2(); - t(p); + return 0; }