[LVI] Add trunc to i1 handling. (#124480)
[llvm-project.git] / compiler-rt / test / asan / TestCases / Windows / integer_divide_by_zero.cpp
blob3febcc48f80dabce012c40fad07902386dda283b
1 // RUN: %clang_cl_asan %Od %s %Fe%t
2 // RUN: %env_asan_opts=handle_sigfpe=1 not %run %t 2>&1 | FileCheck %s
4 // Test the error output from dividing by zero.
6 #include <stdio.h>
8 int main() {
9 puts("before ud2a");
10 fflush(stdout);
11 volatile int numerator = 1;
12 volatile int divisor = 0;
13 return numerator / divisor;
15 // CHECK: before ud2a
16 // CHECK: ERROR: AddressSanitizer: int-divide-by-zero on unknown address [[ADDR:0x[^ ]*]]
17 // CHECK-SAME: (pc [[ADDR]] {{.*}})
18 // CHECK-NEXT: #0 {{.*}} in main {{.*}}integer_divide_by_zero.cpp:{{.*}}