1*7c3d14c8STreehugger Robot // RUN: %clangxx -fsanitize=undefined %s -o %t && %run %t 2>&1 | FileCheck %s 2*7c3d14c8STreehugger Robot // Verify deduplication works by ensuring only one diag is emitted. 3*7c3d14c8STreehugger Robot #include <limits.h> 4*7c3d14c8STreehugger Robot #include <stdio.h> 5*7c3d14c8STreehugger Robot overflow()6*7c3d14c8STreehugger Robotvoid overflow() { 7*7c3d14c8STreehugger Robot int i = INT_MIN; 8*7c3d14c8STreehugger Robot --i; 9*7c3d14c8STreehugger Robot } 10*7c3d14c8STreehugger Robot main()11*7c3d14c8STreehugger Robotint main() { 12*7c3d14c8STreehugger Robot // CHECK: Start 13*7c3d14c8STreehugger Robot fprintf(stderr, "Start\n"); 14*7c3d14c8STreehugger Robot fflush(stderr); 15*7c3d14c8STreehugger Robot 16*7c3d14c8STreehugger Robot // CHECK: runtime error 17*7c3d14c8STreehugger Robot // CHECK-NOT: runtime error 18*7c3d14c8STreehugger Robot // CHECK-NOT: runtime error 19*7c3d14c8STreehugger Robot overflow(); 20*7c3d14c8STreehugger Robot overflow(); 21*7c3d14c8STreehugger Robot overflow(); 22*7c3d14c8STreehugger Robot 23*7c3d14c8STreehugger Robot // CHECK: End 24*7c3d14c8STreehugger Robot fprintf(stderr, "End\n"); 25*7c3d14c8STreehugger Robot return 0; 26*7c3d14c8STreehugger Robot } 27