blob: d9c909f9af4f84526c7de45fc08d804678851922 [file] [log] [blame]
// RUN: %clang -fsanitize=undefined %s -o %t && %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");
// CHECK: runtime error
// CHECK-NOT: runtime error
// CHECK-NOT: runtime error
overflow();
overflow();
overflow();
// CHECK: End
fprintf(stderr, "End\n");
return 0;
}