blob: 20cecbf3f301739b09b908e7b5567852e89f704d [file] [log] [blame]
Daniel Dunbarffd408a2009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Eli Friedman9c0e6f92009-02-28 05:41:13 +00002
3int test1(int x) {
4 goto L; // expected-error{{illegal jump}}
5 int a[x];
6 L:
7 return sizeof a;
8}
Eli Friedmanea917292009-02-28 06:22:14 +00009
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}