reimplement DeclStmt handling so that we correctly handle intermixed 
VLA's and statement expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69491 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/scope-check.c b/test/Sema/scope-check.c
index 1031695..7a35f07 100644
--- a/test/Sema/scope-check.c
+++ b/test/Sema/scope-check.c
@@ -68,6 +68,35 @@
   int Y = ({  int a[x];   // expected-note {{jump bypasses initialization of variable length array}}  
            L3: 4; });
   
+  goto L4; // expected-error {{illegal goto into protected scope}}
+  {
+    int A[x],  // expected-note {{jump bypasses initialization of variable length array}}
+        B[x];  // expected-note {{jump bypasses initialization of variable length array}}
+  L4: ;
+  }
+  
+  {
+  L5: ;// ok
+    int A[x], B = ({ if (x)
+                       goto L5;
+                     else 
+                       goto L6;
+                   4; }); 
+  L6:; // ok.
+  }
+  
+  {
+  L7: ;// ok
+    int A[x], B = ({ if (x)
+                       goto L7;
+                     else 
+                       goto L8;  // expected-error {{illegal goto into protected scope}}
+                     4; }),
+        C[x];   // expected-note {{jump bypasses initialization of variable length array}}
+  L8:; // bad
+  }
+ 
+  
   // Statement expressions 2.
   goto L1;     // expected-error {{illegal goto into protected scope}}
   return x == ({