[cfe-commits] r69492 - /cfe/trunk/test/Sema/scope-check.c
Chris Lattner
sabre at nondot.org
Sat Apr 18 16:07:55 PDT 2009
Author: lattner
Date: Sat Apr 18 18:07:55 2009
New Revision: 69492
URL: http://llvm.org/viewvc/llvm-project?rev=69492&view=rev
Log:
add some testcases that we do not correctly handle.
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=69492&r1=69491&r2=69492&view=diff
==============================================================================
--- cfe/trunk/test/Sema/scope-check.c (original)
+++ cfe/trunk/test/Sema/scope-check.c Sat Apr 18 18:07:55 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify -std=gnu99 %s
int test1(int x) {
goto L; // expected-error{{illegal goto into protected scope}}
@@ -61,7 +61,7 @@
goto L2; // expected-error {{illegal goto into protected scope}}
for (int arr[x]; // expected-note {{jump bypasses initialization of variable length array}}
; ++x)
- L2:;
+ L2:;
// Statement expressions.
goto L3; // expected-error {{illegal goto into protected scope}}
@@ -96,6 +96,23 @@
L8:; // bad
}
+ {
+ L9: ;// ok
+ int A[({ if (x)
+ goto L9;
+ else
+ // FIXME:
+ goto L10; // fixme-error {{illegal goto into protected scope}}
+ 4; })];
+ L10:; // bad
+ }
+
+ {
+ // FIXME: Crashes goto checker.
+ //goto L11;// ok
+ //int A[({ L11: 4; })];
+ }
+
// Statement expressions 2.
goto L1; // expected-error {{illegal goto into protected scope}}
More information about the cfe-commits
mailing list