projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initial checkin of a function with really large basic blocks
[libfirm]
/
ir
/
be
/
test
/
alloca.c
diff --git
a/ir/be/test/alloca.c
b/ir/be/test/alloca.c
index
ecdd0f6
..
54ff025
100644
(file)
--- a/
ir/be/test/alloca.c
+++ b/
ir/be/test/alloca.c
@@
-1,21
+1,39
@@
+#ifdef _WIN32
+#include <malloc.h>
+#else
#include <alloca.h>
#include <alloca.h>
+#endif
+
#include <stdio.h>
struct x {
#include <stdio.h>
struct x {
- int a, b;
+
int a, b;
};
static void t(struct x *p)
{
};
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[])
{
}
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
;
}
}