aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/dostmt.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-25 23:40:10 +0000
committerChris Lattner <sabre@nondot.org>2008-07-25 23:40:10 +0000
commit1e9660e1fb11efb7e65799bc145c0e2b6f3562be (patch)
treeb83afbc9f07cbe4928435f0462921a6fc840f201 /test/CodeGen/dostmt.c
parentffc8a6172ef2e5abf01fcf47c77823ee322ff255 (diff)
Fix rdar://6103124, the only dummy blocks are ones without names. Named blocks
are important part of control flow structures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/dostmt.c')
-rw-r--r--test/CodeGen/dostmt.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/CodeGen/dostmt.c b/test/CodeGen/dostmt.c
index b721974dc5..63547da328 100644
--- a/test/CodeGen/dostmt.c
+++ b/test/CodeGen/dostmt.c
@@ -1,7 +1,7 @@
-// RUN: clang %s -emit-llvm
+// RUN: clang %s -emit-llvm -o -
int bar();
-int foo() {
+int test0() {
int i;
i = 1 + 2;
do {
@@ -12,7 +12,7 @@ int foo() {
}
-int foo1() {
+int test1() {
int i;
i = 1 + 2;
do {
@@ -25,7 +25,7 @@ int foo1() {
}
-int foo2() {
+int test2() {
int i;
i = 1 + 2;
do {
@@ -38,7 +38,7 @@ int foo2() {
}
-int foo3() {
+int test3() {
int i;
i = 1 + 2;
do {
@@ -50,7 +50,7 @@ int foo3() {
}
-int foo4() {
+int test4() {
int i;
i = 1 + 2;
do {
@@ -60,3 +60,11 @@ int foo4() {
} while(0);
return i;
}
+
+// rdar://6103124
+void test5() {
+ do { break; } while(0);
+}
+
+
+