Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* Tests regarding examination of prologues. */ |
2 | ||
085dd6e6 JM |
3 | #ifdef PROTOTYPES |
4 | int | |
5 | inner (int z) | |
6 | #else | |
c906108c SS |
7 | int |
8 | inner (z) | |
9 | int z; | |
085dd6e6 | 10 | #endif |
c906108c SS |
11 | { |
12 | return 2 * z; | |
13 | } | |
14 | ||
085dd6e6 JM |
15 | #ifdef PROTOTYPES |
16 | int | |
17 | middle (int x) | |
18 | #else | |
c906108c SS |
19 | int |
20 | middle (x) | |
21 | int x; | |
085dd6e6 | 22 | #endif |
c906108c SS |
23 | { |
24 | if (x == 0) | |
25 | return inner (5); | |
26 | else | |
27 | return inner (6); | |
28 | } | |
29 | ||
085dd6e6 JM |
30 | #ifdef PROTOTYPES |
31 | int | |
32 | top (int y) | |
33 | #else | |
c906108c SS |
34 | int |
35 | top (y) | |
36 | int y; | |
085dd6e6 | 37 | #endif |
c906108c SS |
38 | { |
39 | return middle (y + 1); | |
40 | } | |
41 | ||
085dd6e6 JM |
42 | #ifdef PROTOTYPES |
43 | int | |
44 | main (int argc, char **argv) | |
45 | #else | |
c906108c SS |
46 | int |
47 | main (argc, argv) | |
085dd6e6 JM |
48 | int argc; |
49 | char **argv; | |
50 | #endif | |
c906108c SS |
51 | { |
52 | #ifdef usestubs | |
53 | set_debug_traps(); | |
54 | breakpoint(); | |
55 | #endif | |
56 | return top (-1) + top (1); | |
57 | } |