summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/asan/instrument-with-calls-2.c
blob: efb481bab12fac97fd2df9350af8576827311a6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "--param asan-instrumentation-with-call-threshold=1 -ffat-lto-objects" } */

int x;

void f(int *a, int *b) {
  *a = 0;
  asm volatile ("" ::: "memory");
  x = *b;
}

/* { dg-final { scan-assembler "__asan_store4" } } */
/* { dg-final { scan-assembler-not "__asan_report_store4" } } */
/* { dg-final { scan-assembler "__asan_load4" } } */
/* { dg-final { scan-assembler-not "__asan_report_load4" } } */