xref: /openbsd-src/gnu/usr.bin/binutils/gdb/testsuite/gdb.base/recurse.c (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
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
5 recurse (a)
6      int a;
7 {
8   int b = 0;
9 
10   if (a == 1)
11     return 1;
12 
13   b = a;
14   b *= recurse (a - 1);
15   return b;
16 }
17 
18 main()
19 {
20   recurse (10);
21 }
22