Fix a flaky heap-overflow-large.cc test

Reviewed at http://reviews.llvm.org/D8515

llvm-svn: 232920
This commit is contained in:
Kuba Brecka 2015-03-22 18:00:58 +00:00
parent 283629a0f7
commit 0e66c49d62
1 changed files with 2 additions and 2 deletions

View File

@ -15,9 +15,9 @@ int main(int argc, char *argv[]) {
int *x = new int[5];
memset(x, 0, sizeof(x[0]) * 5);
int index = atoi(argv[1]);
int res = x[index];
unsigned res = x[index];
// CHECK: main
// CHECK-NOT: CHECK failed
delete[] x;
return res ? res : 1;
return (res % 10) + 1;
}