diff options
Diffstat (limited to 'src/regress/lib/libc/alloca/alloca.c')
-rw-r--r-- | src/regress/lib/libc/alloca/alloca.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/regress/lib/libc/alloca/alloca.c b/src/regress/lib/libc/alloca/alloca.c new file mode 100644 index 0000000000..4f1f18396a --- /dev/null +++ b/src/regress/lib/libc/alloca/alloca.c | |||
@@ -0,0 +1,19 @@ | |||
1 | /* $OpeBSD$ */ | ||
2 | |||
3 | /* Copyright (c) 2003 Michael Shalayeff. Public Domain. */ | ||
4 | |||
5 | #include <stdio.h> | ||
6 | |||
7 | int | ||
8 | main() | ||
9 | { | ||
10 | char *q, *p; | ||
11 | |||
12 | p = alloca(41); | ||
13 | strcpy(p, "hellow world"); | ||
14 | |||
15 | q = alloca(53); | ||
16 | strcpy(q, "hellow world"); | ||
17 | |||
18 | exit(strcmp(p, q)); | ||
19 | } | ||