From: Chris Lattner Date: Sat, 18 Apr 2009 07:54:11 +0000 (+0000) Subject: add another testcase X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd0c0cf85738a664e32f24f56972b3aca2419338;p=clang add another testcase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69432 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/scope-check.c b/test/Sema/scope-check.c index d09ad9c5d5..1d068a2de4 100644 --- a/test/Sema/scope-check.c +++ b/test/Sema/scope-check.c @@ -18,15 +18,27 @@ void test3clean(int*); int test3() { goto L; // expected-error{{illegal jump}} - int a __attribute((cleanup(test3clean))); - L: +int a __attribute((cleanup(test3clean))); +L: return a; } int test4(int x) { - goto L; // expected-error{{illegal jump}} - int a[x]; - test4(x); - L: - return sizeof a; + goto L; // expected-error{{illegal jump}} +int a[x]; + test4(x); +L: + return sizeof a; } + +int test5(int x) { + int a[x]; + test5(x); + goto L; // Ok. +L: + goto L; // Ok. + return sizeof a; +} + + +// FIXME: Switch cases etc.