diff options
Diffstat (limited to 'test/BlocksRuntime/block-static.c')
-rw-r--r-- | test/BlocksRuntime/block-static.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/BlocksRuntime/block-static.c b/test/BlocksRuntime/block-static.c new file mode 100644 index 0000000000000..d38c816cf0153 --- /dev/null +++ b/test/BlocksRuntime/block-static.c @@ -0,0 +1,25 @@ +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. + +// testfilerunner CONFIG + +#include <stdio.h> + + +int main(int argc, char **argv) { + static int numberOfSquesals = 5; + + ^{ numberOfSquesals = 6; }(); + + if (numberOfSquesals == 6) { + printf("%s: success\n", argv[0]); + return 0; + } + printf("**** did not update static local, rdar://6177162\n"); + return 1; + +} + |