[cfe-commits] r148244 - /cfe/trunk/test/CodeGenCXX/switch-case-folding.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Jan 16 09:52:22 PST 2012
Author: fjahanian
Date: Mon Jan 16 11:52:22 2012
New Revision: 148244
URL: http://llvm.org/viewvc/llvm-project?rev=148244&view=rev
Log:
Patch for r148243 which was left behind.
Added:
cfe/trunk/test/CodeGenCXX/switch-case-folding.cpp
Added: cfe/trunk/test/CodeGenCXX/switch-case-folding.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/switch-case-folding.cpp?rev=148244&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/switch-case-folding.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/switch-case-folding.cpp Mon Jan 16 11:52:22 2012
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 %s -emit-llvm-only
+// CHECK that we don't crash.
+
+int main(void){
+ int x = 12;
+ // Make sure we don't crash when constant folding the case 4
+ // statement due to the case 5 statement contained in the do loop
+ switch (4) {
+ case 4: do { case 5: x++;} while (x < 100);
+ }
+ return x;
+}
More information about the cfe-commits
mailing list