blob: b721974dc5747605f31d1dafe6e16c7bab271e81 [file] [log] [blame]
Devang Patela2c53422007-10-09 20:37:41 +00001// RUN: clang %s -emit-llvm
2
3int bar();
4int foo() {
5 int i;
6 i = 1 + 2;
7 do {
8 i = bar();
9 i = bar();
10 } while(0);
11 return i;
12}
13
14
15int foo1() {
16 int i;
17 i = 1 + 2;
18 do {
19 i = bar();
20 if (i == 42)
21 break;
22 i = bar();
23 } while(1);
24 return i;
25}
26
27
28int foo2() {
29 int i;
30 i = 1 + 2;
31 do {
32 i = bar();
33 if (i == 42)
34 continue;
35 i = bar();
36 } while(1);
37 return i;
38}
39
40
41int foo3() {
42 int i;
43 i = 1 + 2;
44 do {
45 i = bar();
46 if (i == 42)
47 break;
48 } while(0);
49 return i;
50}
51
52
53int foo4() {
54 int i;
55 i = 1 + 2;
56 do {
57 i = bar();
58 if (i == 42)
59 continue;
60 } while(0);
61 return i;
62}