summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/scope-check.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/scope-check.c')
-rw-r--r--clang/test/Sema/scope-check.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/test/Sema/scope-check.c b/clang/test/Sema/scope-check.c
index 4605e02b880..83b84777a93 100644
--- a/clang/test/Sema/scope-check.c
+++ b/clang/test/Sema/scope-check.c
@@ -136,14 +136,17 @@ void test9(int n, void *P) {
goto *P; // ok.
L2: ;
- int a[n]; // expected-note {{jump bypasses initialization of variable length array}}
+ int a[n]; // expected-note 2 {{jump bypasses initialization of variable length array}}
L3:
+L4:
goto *P; // expected-error {{illegal indirect goto in protected scope, unknown effect on scopes}}
+ goto L3; // ok
+ goto L4; // ok
void *Ptrs[] = {
- &&L2,
- &&L3 // FIXME: Not Ok.
+ &&L2, // Ok.
+ &&L3 // expected-error {{address taken of label in protected scope, jump to it would have unknown effect on scope}}
};
}
OpenPOWER on IntegriCloud