aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/hwasan/no-sanitize-attribute.c
blob: c0a254dc83a4e662212e337f217c7480fce7eb00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */

__attribute__((no_sanitize("hwaddress"))) int
f (int *p, int *q)
{
  *p = 42;
  return *q;
}

/* Only have one instance of __hwasan, it is __hwasan_init (the module
 * constructor) there is no instrumentation in the function.  */
/* { dg-final { scan-assembler-times "__hwasan" 1 } } */