diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2016-07-21 22:31:40 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2016-07-21 22:31:40 +0000 |
commit | 540a73bdd3b4b7a43ed86dd9077fc2f3a15f8b65 (patch) | |
tree | bddd686d0e8f3d3bff822a43f28e25d5ff5ee86b /test/CodeGenCXX/switch-case-folding-2.cpp | |
parent | 5210a74872875e22571be2a41913783399c18d87 (diff) |
[CodeGen] Fix a crash when constant folding switch statement
Differential revision: https://reviews.llvm.org/D22542
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276350 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/switch-case-folding-2.cpp')
-rw-r--r-- | test/CodeGenCXX/switch-case-folding-2.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenCXX/switch-case-folding-2.cpp b/test/CodeGenCXX/switch-case-folding-2.cpp index b0bbf3282a..558ca3c87d 100644 --- a/test/CodeGenCXX/switch-case-folding-2.cpp +++ b/test/CodeGenCXX/switch-case-folding-2.cpp @@ -18,4 +18,13 @@ int main(void) { return test(5); } +void other_test() { + switch(0) { + case 0: + do { + default:; + } while(0); + } +} + // CHECK: call i32 (i8*, ...) @_Z6printfPKcz |