middle-end: Fix stalled swapped condition code value [PR115836]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / inlining-2-multiline.c
blob7a259a8b9976190b7d01d36c78c367499035ee81
1 /* As per inlining-2.c, but testing how the ASCII art version of
2 the path looks. */
4 /* { dg-additional-options "-O2 -fdiagnostics-show-path-depths" } */
5 /* { dg-additional-options "-fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */
7 static void __analyzer_foo (void *p)
9 __builtin_free (p);
11 __builtin_free (p); /* { dg-warning "double-'free' of 'q'" "warning" } */
14 void bar (void *q)
16 __analyzer_foo (q);
19 /* { dg-begin-multiline-output "" }
20 __builtin_free (p);
21 ^~~~~~~~~~~~~~~~~~
22 'bar': events 1-2 (depth 1)
24 | void bar (void *q)
25 | ^~~
26 | |
27 | (1) entry to 'bar'
29 | __analyzer_foo (q);
30 | ~
31 | |
32 | (2) inlined call to '__analyzer_foo' from 'bar'
34 +--> '__analyzer_foo': events 3-4 (depth 2)
36 | __builtin_free (p);
37 | ^~~~~~~~~~~~~~~~~~
38 | |
39 | (3) first 'free' here
41 | __builtin_free (p);
42 | ~~~~~~~~~~~~~~~~~~
43 | |
44 | (4) second 'free' here; first 'free' was at (3)
46 { dg-end-multiline-output "" { target c } } */
47 /* { dg-begin-multiline-output "" }
48 __builtin_free (p);
49 ~~~~~~~~~~~~~~~^~~
50 'void bar(void*)': events 1-2 (depth 1)
52 | void bar (void *q)
53 | ^~~
54 | |
55 | (1) entry to 'bar'
57 | __analyzer_foo (q);
58 | ~
59 | |
60 | (2) inlined call to '__analyzer_foo' from 'bar'
62 +--> 'void __analyzer_foo(void*)': events 3-4 (depth 2)
64 | __builtin_free (p);
65 | ~~~~~~~~~~~~~~~^~~
66 | |
67 | (3) first 'free' here
69 | __builtin_free (p);
70 | ~~~~~~~~~~~~~~~~~~
71 | |
72 | (4) second 'free' here; first 'free' was at (3)
74 { dg-end-multiline-output "" { target c++ } } */