2 /* { dg-set-target-env-var ASAN_OPTIONS "detect_invalid_pointer_pairs=2 halt_on_error=1" } */
3 /* { dg-options "-fsanitize=address,pointer-subtract" } */
5 volatile __PTRDIFF_TYPE__ v
;
14 char global
[10000] = {};
19 /* Heap allocated memory. */
20 char *p
= (char *)__builtin_malloc (42);
24 /* Global variable. */
25 bar (&global
[0], &global
[100]);
26 bar (&global
[1000], &global
[9000]);
27 bar (&global
[500], &global
[10]);
28 bar (&global
[0], &global
[10000]);
32 bar (&stack
[0], &stack
[100]);
33 bar (&stack
[1000], &stack
[9000]);
34 bar (&stack
[500], &stack
[10]);