xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2002-04-07-SwitchStmt.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s  -o /dev/null
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc int printf(const char *, ...);
4*f4a2713aSLionel Sambuc int foo();
5*f4a2713aSLionel Sambuc 
main()6*f4a2713aSLionel Sambuc int main() {
7*f4a2713aSLionel Sambuc   while (foo()) {
8*f4a2713aSLionel Sambuc      switch (foo()) {
9*f4a2713aSLionel Sambuc      case 0:
10*f4a2713aSLionel Sambuc      case 1:
11*f4a2713aSLionel Sambuc      case 2:
12*f4a2713aSLionel Sambuc      case 3:
13*f4a2713aSLionel Sambuc        printf("3");
14*f4a2713aSLionel Sambuc      case 4: printf("4");
15*f4a2713aSLionel Sambuc      case 5:
16*f4a2713aSLionel Sambuc      case 6:
17*f4a2713aSLionel Sambuc      default:
18*f4a2713aSLionel Sambuc        break;
19*f4a2713aSLionel Sambuc      }
20*f4a2713aSLionel Sambuc    }
21*f4a2713aSLionel Sambuc    return 0;
22*f4a2713aSLionel Sambuc }
23