Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / ubsan_minimal / TestCases / implicit-signed-integer-truncation-or-sign-change.c
blobe9f26dd7450cd647a045098faf7129d1a1aa9163
1 // RUN: %clang -fsanitize=implicit-signed-integer-truncation,implicit-integer-sign-change %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
3 #include <stdint.h>
5 int main() {
6 // CHECK-NOT: implicit-conversion
8 // Explicitly casting hides it,
9 int8_t n0 = (int8_t)((uint32_t)-1);
11 // Positive tests.
12 int8_t t0 = (uint32_t)-1;
13 // CHECK: implicit-conversion by 0x{{[[:xdigit:]]+$}}
14 // CHECK-NOT: implicit-conversion
16 return 0;