[cfe-commits] r42810 - /cfe/trunk/test/CodeGen/dostmt.c
Devang Patel
dpatel at apple.com
Tue Oct 9 13:37:41 PDT 2007
Author: dpatel
Date: Tue Oct 9 15:37:41 2007
New Revision: 42810
URL: http://llvm.org/viewvc/llvm-project?rev=42810&view=rev
Log:
new test
Added:
cfe/trunk/test/CodeGen/dostmt.c
Added: cfe/trunk/test/CodeGen/dostmt.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/dostmt.c?rev=42810&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/dostmt.c (added)
+++ cfe/trunk/test/CodeGen/dostmt.c Tue Oct 9 15:37:41 2007
@@ -0,0 +1,62 @@
+// RUN: clang %s -emit-llvm
+
+int bar();
+int foo() {
+ int i;
+ i = 1 + 2;
+ do {
+ i = bar();
+ i = bar();
+ } while(0);
+ return i;
+}
+
+
+int foo1() {
+ int i;
+ i = 1 + 2;
+ do {
+ i = bar();
+ if (i == 42)
+ break;
+ i = bar();
+ } while(1);
+ return i;
+}
+
+
+int foo2() {
+ int i;
+ i = 1 + 2;
+ do {
+ i = bar();
+ if (i == 42)
+ continue;
+ i = bar();
+ } while(1);
+ return i;
+}
+
+
+int foo3() {
+ int i;
+ i = 1 + 2;
+ do {
+ i = bar();
+ if (i == 42)
+ break;
+ } while(0);
+ return i;
+}
+
+
+int foo4() {
+ int i;
+ i = 1 + 2;
+ do {
+ i = bar();
+ if (i == 42)
+ continue;
+ } while(0);
+ return i;
+}
More information about the cfe-commits
mailing list