diff options
Diffstat (limited to 'test/FrontendC/2002-05-24-Alloca.c')
-rw-r--r-- | test/FrontendC/2002-05-24-Alloca.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/FrontendC/2002-05-24-Alloca.c b/test/FrontendC/2002-05-24-Alloca.c new file mode 100644 index 0000000..128bc8b --- /dev/null +++ b/test/FrontendC/2002-05-24-Alloca.c @@ -0,0 +1,11 @@ +// RUN: %llvmgcc -S %s -o - | llvm-as -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); +} |