diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-24 01:50:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-24 01:50:29 +0000 |
commit | 7e52de4b45286d057b367bb1f9283a1e32d79252 (patch) | |
tree | f4b19a3887ac0e6daada5daa22d8a8751386ef2e /test/Sema/statements.c | |
parent | 31819f53836eabb6d2dfeca34487d9a960cb6491 (diff) | |
download | clang-7e52de4b45286d057b367bb1f9283a1e32d79252.tar.gz |
fix PR6034, a crash on invalid where the switch stack would get
unbalanced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/statements.c')
-rw-r--r-- | test/Sema/statements.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/statements.c b/test/Sema/statements.c index 3cd2460e79..6da2daa01a 100644 --- a/test/Sema/statements.c +++ b/test/Sema/statements.c @@ -33,3 +33,11 @@ void *test10() { bar: return &&bar; // expected-warning {{returning address of label, which is local}} } + +// PR6034 +void test11(int bit) { + switch (bit) + switch (env->fpscr) // expected-error {{use of undeclared identifier 'env'}} + { + } +} |