gcc/testsuite/c-c++-common/analyzer/inlining-6.c
raw| 1 | /* Verify that we can reconstruct fndecl and stack depth information |
| 2 | after early inlining. */ |
| 3 | |
| 4 | /* { dg-additional-options "-O2 -fdiagnostics-show-path-depths" } */ |
| 5 | |
| 6 | static inline void |
| 7 | inner (void *p) |
| 8 | { |
| 9 | __builtin_free (p); |
| 10 | } |
| 11 | |
| 12 | static inline void |
| 13 | middle (void *q) |
| 14 | { |
| 15 | inner (q); |
| 16 | __builtin_free (q); /* { dg-warning "double-'free' of 'r'" "warning" } */ |
| 17 | } |
| 18 | |
| 19 | void |
| 20 | outer (void *r) |
| 21 | { |
| 22 | middle (r); |
| 23 | } |