diff --git a/compiler-rt/test/asan/TestCases/invalid-pointer-pairs.cc b/compiler-rt/test/asan/TestCases/invalid-pointer-pairs.cc index 874107cdff77..f3879d0cb4b5 100644 --- a/compiler-rt/test/asan/TestCases/invalid-pointer-pairs.cc +++ b/compiler-rt/test/asan/TestCases/invalid-pointer-pairs.cc @@ -8,11 +8,12 @@ #include #include +char *p; int main(int argc, char **argv) { // ALL-ERRORS: ERROR: AddressSanitizer: invalid-pointer-pair // [[PTR1:0x[0-9a-f]+]] [[PTR2:0x[0-9a-f]+]] assert(argc >= 2); - char *p = (char *)malloc(42); + p = (char *)malloc(42); char *q = (char *)malloc(42); switch (argv[1][0]) { case 'g':