[cfe-commits] r69432 - /cfe/trunk/test/Sema/scope-check.c

Chris Lattner sabre at nondot.org
Sat Apr 18 00:54:11 PDT 2009


Author: lattner
Date: Sat Apr 18 02:54:11 2009
New Revision: 69432

URL: http://llvm.org/viewvc/llvm-project?rev=69432&view=rev
Log:
add another testcase

Modified:
    cfe/trunk/test/Sema/scope-check.c

Modified: cfe/trunk/test/Sema/scope-check.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/scope-check.c?rev=69432&r1=69431&r2=69432&view=diff

==============================================================================
--- cfe/trunk/test/Sema/scope-check.c (original)
+++ cfe/trunk/test/Sema/scope-check.c Sat Apr 18 02:54:11 2009
@@ -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.





More information about the cfe-commits mailing list