scope-check.c revision 709fa15defbc0208b33707b3da3a628df5a9b7b9
1// RUN: clang -fsyntax-only -verify %s
2
3int test1(int x) {
4  goto L; // expected-error{{illegal jump}}
5  int a[x];
6  L:
7  return sizeof a;
8}
9
10int test2(int x) {
11  goto L; // expected-error{{illegal jump}}
12  typedef int a[x];
13  L:
14  return sizeof(a);
15}
16
17void test3clean(int*);
18
19int test3() {
20  goto L; // expected-error{{illegal jump}}
21  int a __attribute((cleanup(test3clean)));
22  L:
23  return a;
24}
25