xref: /llvm-project/compiler-rt/test/fuzzer/fuzzer-implicit-signed-integer-truncation.test (revision d733430c19ed9453b0b66943b83a4a62c83c6ade)
1d32c0d14SRoman LebedevRUN: rm -f %t-ImplicitSignedIntegerTruncationTest-Ubsan
2d32c0d14SRoman LebedevRUN: %cpp_compiler -fsanitize=implicit-signed-integer-truncation -fno-sanitize-recover=all %S/ImplicitSignedIntegerTruncationTest.cpp -o %t-ImplicitSignedIntegerTruncationTest-Ubsan
3d32c0d14SRoman LebedevRUN: not %run %t-ImplicitSignedIntegerTruncationTest-Ubsan 2>&1 | FileCheck %s
4*d733430cSVitaly BukaCHECK: ImplicitSignedIntegerTruncationTest.cpp:23:17: runtime error: implicit conversion from type 'int' of value 256 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 0 (8-bit, unsigned)
5d32c0d14SRoman LebedevCHECK: Test unit written to ./crash-
6