diff options
Diffstat (limited to 'test/CodeGen/globalinit.c')
-rw-r--r-- | test/CodeGen/globalinit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/globalinit.c b/test/CodeGen/globalinit.c index f47fd5c457..66bffd3dce 100644 --- a/test/CodeGen/globalinit.c +++ b/test/CodeGen/globalinit.c @@ -19,3 +19,10 @@ int (*mb_ptr2len) (char *p) = latin_ptr2len; char string[8] = "string"; // extend init char string2[4] = "string"; // truncate init +char *test(int c) { + static char buf[10]; + static char *bufptr = buf; + + return c ? buf : bufptr; +} + |