xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.base/recurse.c (revision a5a4af3bd380a7b58b758d9b311cef9f7c34aeb4)
1 /* Trivial code used to test watchpoints in recursive code and
2    auto-deletion of watchpoints as they go out of scope.  */
3 
4 static int
recurse(int a)5 recurse (int a)
6 {
7   int b = 0;
8 
9   if (a == 1)
10     return 1;
11 
12   b = a;
13   b *= recurse (a - 1);
14   return b;
15 }
16 
main()17 int main()
18 {
19   recurse (10);
20   return 0;
21 }
22