Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/infinite-recursion-4-unlimited.c

raw
1 /* { dg-additional-options "-fno-analyzer-call-summaries -Wno-analyzer-too-complex" } */
2
3 /* A two-deep mutual recursion, walking a linked list (and thus presumably
4 terminating), with no explicit depth limit. */
5
6 struct node
7 {
8 struct node *child;
9 };
10
11 void foo (struct node *f);
12
13 void bar (struct node *b)
14 {
15 foo (b); /* { dg-bogus "infinite recursion" } */
16 }
17
18 void foo (struct node *f)
19 {
20 if (f->child)
21 bar (f->child); /* { dg-bogus "infinite recursion" } */
22 }