add another testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69432 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/scope-check.c b/test/Sema/scope-check.c
index d09ad9c..1d068a2 100644
--- a/test/Sema/scope-check.c
+++ b/test/Sema/scope-check.c
@@ -18,15 +18,27 @@
int test3() {
goto L; // expected-error{{illegal jump}}
- int a __attribute((cleanup(test3clean)));
- L:
+int a __attribute((cleanup(test3clean)));
+L:
return a;
}
int test4(int x) {
- goto L; // expected-error{{illegal jump}}
- int a[x];
- test4(x);
- L:
- return sizeof a;
+ goto L; // expected-error{{illegal jump}}
+int a[x];
+ test4(x);
+L:
+ return sizeof a;
}
+
+int test5(int x) {
+ int a[x];
+ test5(x);
+ goto L; // Ok.
+L:
+ goto L; // Ok.
+ return sizeof a;
+}
+
+
+// FIXME: Switch cases etc.