| 1 |
/* Test for -fno-analyzer-undo-inlining. |
| 2 |
Verify that we can disable reconstruction of fndecl and stack depth |
| 3 |
information. */ |
| 4 |
|
| 5 |
/* { dg-additional-options "-O2 -fdiagnostics-show-path-depths -fno-analyzer-undo-inlining" } */ |
| 6 |
|
| 7 |
void foo (void *p) |
| 8 |
{ |
| 9 |
__builtin_free (p); /* { dg-warning "double-'free' of 'q'" "warning" } */ |
| 10 |
/* { dg-message "\\(1\\) first 'free' here \\(fndecl 'bar', depth 1\\)" "1st free message" { target c } .-1 } */ |
| 11 |
/* { dg-message "\\(1\\) first 'free' here \\(fndecl 'void bar\\(void\\*\\)', depth 1\\)" "1st free message" { target c++ } .-2 } */ |
| 12 |
/* { dg-message "\\(2\\) second 'free' here; first 'free' was at \\(1\\) \\(fndecl 'bar', depth 1\\)" "2nd free message" { target c } .-3 } */ |
| 13 |
/* { dg-message "\\(2\\) second 'free' here; first 'free' was at \\(1\\) \\(fndecl 'void bar\\(void\\*\\)', depth 1\\)" "2nd free message" { target c++ } .-4 } */ |
| 14 |
} |
| 15 |
|
| 16 |
void bar (void *q) |
| 17 |
{ |
| 18 |
foo (q); |
| 19 |
foo (q); |
| 20 |
} |