1 // RUN: %clang_cc1 -fsanitize=local-bounds -emit-llvm -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -fsanitize=array-bounds -O -fsanitize-undefined-trap-on-error -emit-llvm -triple x86_64-apple-darwin10 -DNO_DYNAMIC %s -o - | FileCheck %s
5 double f(int b, int i) {
7 // CHECK: call {{.*}} @llvm.trap
13 // everything is constant; no trap possible
14 // CHECK-NOT: call {{.*}} @llvm.trap
19 short *b = malloc(64);
27 // CHECK: call {{.*}} @llvm.trap