diff options
author | Devang Patel <dpatel@apple.com> | 2007-10-09 20:37:41 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-10-09 20:37:41 +0000 |
commit | f8a76755df0cfa1cbb0adb7a5a53a287a37f0582 (patch) | |
tree | c9d3bf744fd8030a7409d6628a815cf06bd15133 /clang/test/CodeGen/dostmt.c | |
parent | 87547e6c15ebdd35f930e4879911021ec9e5af47 (diff) | |
download | bcm5719-llvm-f8a76755df0cfa1cbb0adb7a5a53a287a37f0582.tar.gz bcm5719-llvm-f8a76755df0cfa1cbb0adb7a5a53a287a37f0582.zip |
new test
llvm-svn: 42810
Diffstat (limited to 'clang/test/CodeGen/dostmt.c')
-rw-r--r-- | clang/test/CodeGen/dostmt.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/clang/test/CodeGen/dostmt.c b/clang/test/CodeGen/dostmt.c new file mode 100644 index 00000000000..b721974dc57 --- /dev/null +++ b/clang/test/CodeGen/dostmt.c @@ -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; +} |