diff --git a/compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc b/compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc index 82f63359ead7..3c4f7d65eeb1 100644 --- a/compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc +++ b/compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc @@ -10,8 +10,12 @@ int foo(char *p, char *q) { } char global1[100] = {}, global2[100] = {}; +char __attribute__((used)) smallest_global[5] = {}; char small_global[7] = {}; +char __attribute__((used)) little_global[10] = {}; +char __attribute__((used)) medium_global[4000] = {}; char large_global[5000] = {}; +char __attribute__((used)) largest_global[6000] = {}; int main() { // Heap allocated memory. diff --git a/compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc b/compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc index 4ce48424899d..de175a778c99 100644 --- a/compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc +++ b/compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc @@ -6,7 +6,7 @@ #include int bar(char *p, char *q) { - return p <= q; + return p - q; } char global[10000] = {};