blob: 7f63b39a230755d0a93b6a3350ff31ebe8945793 [file] [log] [blame]
// RUN: %clang_cc1 %s -emit-llvm -fsanitize=float-divide-by-zero -o - | FileCheck %s
_Bool b;
// CHECK: @f(
double f() {
// CHECK: %[[B:.*]] = load {{.*}} @b
// CHECK: %[[COND:.*]] = trunc {{.*}} %[[B]] to i1
// CHECK: br i1 %[[COND]]
return b ? 0.0 / 0.0 : 0.0;
}