more testcases of variably modified types.
llvm-svn: 69506
diff --git a/clang/test/Sema/scope-check.c b/clang/test/Sema/scope-check.c
index 83b8477..1eb47e7 100644
--- a/clang/test/Sema/scope-check.c
+++ b/clang/test/Sema/scope-check.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify -std=gnu99 %s
+// RUN: clang-cc -fsyntax-only -verify -fblocks -std=gnu99 %s
int test1(int x) {
goto L; // expected-error{{illegal goto into protected scope}}
@@ -150,3 +150,17 @@
};
}
+void test10(int n, void *P) {
+ goto L0; // expected-error {{illegal goto into protected scope}}
+ typedef int A[n]; // expected-note {{jump bypasses initialization of VLA typedef}}
+L0:
+
+ goto L1; // expected-error {{illegal goto into protected scope}}
+ A b, c[10]; // expected-note 2 {{jump bypasses initialization of variable length array}}
+L1:
+ goto L2; // expected-error {{illegal goto into protected scope}}
+ A d[n]; // expected-note {{jump bypasses initialization of variable length array}}
+L2:
+ return;
+}
+