aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/inline.c
blob: 6cf67f974002d5cc1006afde556aa216e5d0d2f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-fsanitize=vla-bound -c -O3 -fdump-tree-optimized -ffat-lto-objects" } */

int x;

static inline
__attribute__((no_sanitize("undefined")))
void do_not_sanitize(void)
{
  x++;
}

void
sanitize_this(void)
{
  x++;
  do_not_sanitize();
}

/* { dg-final { scan-tree-dump-times "Function do_not_sanitize" 1 "optimized" } } */