aboutsummaryrefslogtreecommitdiffstats
path: root/test/CFrontend/2002-05-24-Alloca.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CFrontend/2002-05-24-Alloca.c')
-rw-r--r--test/CFrontend/2002-05-24-Alloca.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CFrontend/2002-05-24-Alloca.c b/test/CFrontend/2002-05-24-Alloca.c
new file mode 100644
index 0000000..698452e
--- /dev/null
+++ b/test/CFrontend/2002-05-24-Alloca.c
@@ -0,0 +1,9 @@
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv) {
+ char *C = (char*)alloca(argc);
+ strcpy(C, argv[0]);
+ puts(C);
+}