summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/block-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/block-misc.c')
-rw-r--r--clang/test/Sema/block-misc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Sema/block-misc.c b/clang/test/Sema/block-misc.c
index 294c295c5f8..1f1cad44a94 100644
--- a/clang/test/Sema/block-misc.c
+++ b/clang/test/Sema/block-misc.c
@@ -185,3 +185,16 @@ void test18() {
void (^const blockA)(void) = ^{ };
blockA = ^{ }; // expected-error {{read-only variable is not assignable}}
}
+
+// rdar://7072507
+int test19() {
+ goto L0; // expected-error {{illegal goto into protected scope}}
+
+ __block int x; // expected-note {{jump bypasses setup of __block variable}}
+L0:
+ x = 0;
+ ^(){ ++x; }();
+ return x;
+}
+
+
OpenPOWER on IntegriCloud