fix PR6034, a crash on invalid where the switch stack would get
unbalanced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/statements.c b/test/Sema/statements.c
index 3cd2460..6da2daa 100644
--- a/test/Sema/statements.c
+++ b/test/Sema/statements.c
@@ -33,3 +33,11 @@
bar:
return &&bar; // expected-warning {{returning address of label, which is local}}
}
+
+// PR6034
+void test11(int bit) {
+ switch (bit)
+ switch (env->fpscr) // expected-error {{use of undeclared identifier 'env'}}
+ {
+ }
+}