1 // RUN: %clang_cc1 -fsyntax-only -verify %s
6 goto L; // expected-error{{illegal goto into protected scope}}
7 goto L2; // expected-error{{illegal goto into protected scope}}
8 goto L3; // expected-error{{illegal goto into protected scope}}
9 @try { // expected-note {{jump bypasses initialization of @try block}}
11 } @catch (A *x) { // expected-note {{jump bypasses initialization of @catch block}}
15 } @finally {// expected-note {{jump bypasses initialization of @finally block}}
20 goto L4; // expected-error{{illegal goto into protected scope}}
21 goto L5; // expected-error{{illegal goto into protected scope}}
22 } @catch (C *c) { // expected-note {{jump bypasses initialization of @catch block}}
24 goto L6; // expected-error{{illegal goto into protected scope}}
25 } @catch (B *c) { // expected-note {{jump bypasses initialization of @catch block}}
27 } @finally { // expected-note {{jump bypasses initialization of @finally block}}
32 @try { // expected-note 2 {{jump bypasses initialization of @try block}}
35 goto L7; // expected-error{{illegal goto into protected scope}}
37 goto L7; // expected-error{{illegal goto into protected scope}}
40 goto L8; // expected-error{{illegal goto into protected scope}}
44 } @catch (C *c) { // expected-note {{jump bypasses initialization of @catch block}}
50 goto L9; // expected-error{{illegal goto into protected scope}}
52 @synchronized // expected-note {{jump bypasses initialization of @synchronized block}}
78 @implementation Greeter
82 goto blargh; // expected-error {{illegal goto into protected scope}}
83 } @catch (...) { // expected-note {{jump bypasses initialization of @catch block}}
90 goto L0; // expected-error {{illegal goto into protected scope}}
91 typedef int A[n]; // expected-note {{jump bypasses initialization of VLA typedef}}
94 goto L1; // expected-error {{illegal goto into protected scope}}
95 A b, c[10]; // expected-note 2 {{jump bypasses initialization of variable length array}}
97 goto L2; // expected-error {{illegal goto into protected scope}}
98 A d[n]; // expected-note {{jump bypasses initialization of variable length array}}