From 5b40e0cebcb883540ec3005c47a960107e65f375 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 18 Apr 2009 22:56:52 +0000 Subject: [PATCH] rearrange. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69490 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/scope-check.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/Sema/scope-check.c b/test/Sema/scope-check.c index 181b6c5aa4..10316950fe 100644 --- a/test/Sema/scope-check.c +++ b/test/Sema/scope-check.c @@ -57,17 +57,21 @@ void test7(int x) { } int test8(int x) { - if (x) goto L; // expected-error {{illegal goto into protected scope}} + // For statement. goto L2; // expected-error {{illegal goto into protected scope}} - for (int arr[x]; // expected-note {{jump bypasses initialization of variable length array}} - ; ++x) { - + ; ++x) L2:; - } + + // Statement expressions. + goto L3; // expected-error {{illegal goto into protected scope}} + int Y = ({ int a[x]; // expected-note {{jump bypasses initialization of variable length array}} + L3: 4; }); + // Statement expressions 2. + goto L1; // expected-error {{illegal goto into protected scope}} return x == ({ int a[x]; // expected-note {{jump bypasses initialization of variable length array}} - L: + L1: 42; }); } -- 2.40.0