19 lines · cpp
1// RUN: %clangxx -fsanitize=builtin -g0 %s -o %t2 3// Suppression by symbol name requires the compiler-rt runtime to be able to4// symbolize stack addresses.5// REQUIRES: can-symbolize6// UNSUPPORTED: android7 8// RUN: echo "invalid-builtin-use:do_ctz" > %t.func-supp9// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.func-supp"' %run %t10 11#include <stdint.h>12 13extern "C" void do_ctz(int n) { __builtin_ctz(0); }14 15int main() {16 do_ctz(0);17 return 0;18}19