diff options
Diffstat (limited to 'regress/lib/libc/alloca/alloca.c')
-rw-r--r-- | regress/lib/libc/alloca/alloca.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/regress/lib/libc/alloca/alloca.c b/regress/lib/libc/alloca/alloca.c new file mode 100644 index 00000000000..4f1f18396a1 --- /dev/null +++ b/regress/lib/libc/alloca/alloca.c @@ -0,0 +1,19 @@ +/* $OpeBSD$ */ + +/* Copyright (c) 2003 Michael Shalayeff. Public Domain. */ + +#include <stdio.h> + +int +main() +{ + char *q, *p; + + p = alloca(41); + strcpy(p, "hellow world"); + + q = alloca(53); + strcpy(q, "hellow world"); + + exit(strcmp(p, q)); +} |