aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/fake-use-while.c
blob: a74887d979528815ef75007d625bcaaee4107e26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: %clang_cc1 %s -emit-llvm -fextend-variable-liveness -o - | FileCheck %s
//
// Check we don't assert when there is no more code after a while statement
// and the body of the while statement ends in a return, i.e. no insertion point
// is available.

// CHECK: define{{.*}}foo
// CHECK: call{{.*}}llvm.fake.use

void foo() {
  {
    while (1) {
      int ret;
      if (1)
        return;
    }
  }
}