Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / ubsan / TestCases / ImplicitConversion / signed-integer-truncation-summary.cpp
blobe5459bab40bf4a46af457bfe1feccad0b3ace5ee
1 // RUN: %clangxx -fsanitize=implicit-signed-integer-truncation %s -o %t
2 // RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOTYPE
3 // RUN: %env_ubsan_opts=report_error_type=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TYPE
5 #include <stdint.h>
7 int main() {
8 uint8_t t0 = int32_t(-1);
9 // CHECK-NOTYPE: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior {{.*}}summary.cpp:[[@LINE-1]]:16
10 // CHECK-TYPE: SUMMARY: UndefinedBehaviorSanitizer: implicit-signed-integer-truncation {{.*}}summary.cpp:[[@LINE-2]]:16
11 return 0;