Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / ubsan_minimal / TestCases / recover-dedup-limit.cpp
blobfaa2b66ad80f94647c3569ac33654bcbcc4d5586
1 // RUN: %clangxx -fsanitize=signed-integer-overflow -fsanitize-recover=all %s -o %t && %run %t 2>&1 | FileCheck %s
3 #include <stdint.h>
5 #define OVERFLOW \
6 x = 0x7FFFFFFE; \
7 x += __LINE__
9 int main() {
10 int32_t x;
11 OVERFLOW; // CHECK: add-overflow
12 OVERFLOW; // CHECK: add-overflow
13 OVERFLOW; // CHECK: add-overflow
14 OVERFLOW; // CHECK: add-overflow
15 OVERFLOW; // CHECK: add-overflow
17 OVERFLOW; // CHECK: add-overflow
18 OVERFLOW; // CHECK: add-overflow
19 OVERFLOW; // CHECK: add-overflow
20 OVERFLOW; // CHECK: add-overflow
21 OVERFLOW; // CHECK: add-overflow
23 OVERFLOW; // CHECK: add-overflow
24 OVERFLOW; // CHECK: add-overflow
25 OVERFLOW; // CHECK: add-overflow
26 OVERFLOW; // CHECK: add-overflow
27 OVERFLOW; // CHECK: add-overflow
29 OVERFLOW; // CHECK: add-overflow
30 OVERFLOW; // CHECK: add-overflow
31 OVERFLOW; // CHECK: add-overflow
32 OVERFLOW; // CHECK: add-overflow
33 OVERFLOW; // CHECK: add-overflow
35 // CHECK-NOT: add-overflow
36 OVERFLOW; // CHECK: too many errors
37 // CHECK-NOT: add-overflow
38 OVERFLOW;
39 OVERFLOW;
40 OVERFLOW;