aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/analyzer/inlining-6.c
blob: e19e85a78e9fc9ed4f07a83bcb4e3ed515842e82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Verify that we can reconstruct fndecl and stack depth information
   after early inlining.  */

/* { dg-additional-options "-O2 -fdiagnostics-show-path-depths" } */

static inline void
inner (void *p)
{
  __builtin_free (p);
}

static inline void
middle (void *q)
{
  inner (q);
  __builtin_free (q);  /* { dg-warning "double-'free' of 'r'" "warning" } */
}

void
outer (void *r)
{
  middle (r);
}