You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
500 B

// RUN: %clangxx -fsanitize=undefined %s -o %t && %run %t 2>&1 | FileCheck %s
// Verify deduplication works by ensuring only one diag is emitted.
#include <limits.h>
#include <stdio.h>
void overflow() {
int i = INT_MIN;
--i;
}
int main() {
// CHECK: Start
fprintf(stderr, "Start\n");
fflush(stderr);
// CHECK: runtime error
// CHECK-NOT: runtime error
// CHECK-NOT: runtime error
overflow();
overflow();
overflow();
// CHECK: End
fprintf(stderr, "End\n");
return 0;
}