Debian Codegraph @

gcc/testsuite/c-c++-common/asan/pointer-subtract-7.c

raw
1 /* PR middle-end/108543 */
2 /* { dg-do compile } */
3 /* { dg-options "-fno-sanitize=kernel-address -fsanitize=address -fsanitize=pointer-subtract" } */
4
5 struct S {
6 long _M_p;
7 };
8
9 typedef struct S S;
10
11 __PTRDIFF_TYPE__
12 f (S __x, S __y)
13 {
14 return &__x._M_p - &__y._M_p;
15 }