brintos

brintos / llvm-project-archived public Read only

0
0
Text · 869 B · 474ffca Raw
76 lines · c
1// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s2 3int bar(void);4int test0(void) {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 test1(void) {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 test2(void) {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 test3(void) {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 test4(void) {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}63 64void test5(void) {65  do { break; } while(0);66}67 68// PR1419169void test6f(void);70void test6(void) {71  do {72  } while (test6f(), 0);73  // CHECK: call {{.*}}void @test6f()74}75 76