scope-check.c revision d7d5f0223bd30dfd618762349c6209dd1d5ea3e6
1// RUN: clang-cc -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