summaryrefslogtreecommitdiffstats
path: root/llvm/test/FrontendC/2002-05-24-Alloca.c
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/FrontendC/2002-05-24-Alloca.c')
-rw-r--r--llvm/test/FrontendC/2002-05-24-Alloca.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/FrontendC/2002-05-24-Alloca.c b/llvm/test/FrontendC/2002-05-24-Alloca.c
new file mode 100644
index 00000000000..ac5b78d0c99
--- /dev/null
+++ b/llvm/test/FrontendC/2002-05-24-Alloca.c
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+#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);
+}
OpenPOWER on IntegriCloud