summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-18 07:54:11 +0000
committerChris Lattner <sabre@nondot.org>2009-04-18 07:54:11 +0000
commit9f3e71150348cfd7977bef53626ab50cb315c921 (patch)
treeee356dc8666bce5ff1133c4311168fb648c4301e
parent7a845306aa90870e8b7d9e43d35b8ba0551def25 (diff)
downloadbcm5719-llvm-9f3e71150348cfd7977bef53626ab50cb315c921.tar.gz
bcm5719-llvm-9f3e71150348cfd7977bef53626ab50cb315c921.zip
add another testcase
llvm-svn: 69432
-rw-r--r--clang/test/Sema/scope-check.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/clang/test/Sema/scope-check.c b/clang/test/Sema/scope-check.c
index d09ad9c5d55..1d068a2de43 100644
--- a/clang/test/Sema/scope-check.c
+++ b/clang/test/Sema/scope-check.c
@@ -18,15 +18,27 @@ void test3clean(int*);
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.
OpenPOWER on IntegriCloud