gcc/testsuite/gcc.dg/analyzer/call-summaries-pr114473.c
raw| 1 | /* { dg-additional-options "-fanalyzer-call-summaries" } */ |
| 2 | |
| 3 | int a; |
| 4 | extern int *q[]; |
| 5 | |
| 6 | int * |
| 7 | baz (int *src) |
| 8 | { |
| 9 | while (a) |
| 10 | { |
| 11 | src && a; |
| 12 | return src; |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | void |
| 17 | bar (int **src) |
| 18 | { |
| 19 | for (unsigned j = 0; j;) |
| 20 | a = 0; |
| 21 | while (a) |
| 22 | baz (src[0]); |
| 23 | } |
| 24 | |
| 25 | void |
| 26 | foo (void) |
| 27 | { |
| 28 | bar (q); |
| 29 | baz (&a); |
| 30 | bar (q); |
| 31 | } |