2 /* { dg-set-target-env-var ASAN_OPTIONS "detect_invalid_pointer_pairs=1:halt_on_error=1" } */
3 /* { dg-options "-fsanitize=address,pointer-compare" } */
5 int foo(char *p
, char *q
) {
9 char global
[8192] = {};
10 char small_global
[7] = {};
13 // Heap allocated memory.
14 char *p
= (char *)__builtin_malloc(42);
18 p
= (char *)__builtin_malloc(1024);
22 p
= (char *)__builtin_malloc(4096);
28 foo(&global
[1000], 0);