Commit | Line | Data |
---|---|---|
3207ec21 KB |
1 | /* Test step/next in presence of #line directives. |
2 | Copyright 2001 | |
3 | Free Software Foundation, Inc. | |
4 | ||
5 | This file is part of GDB. | |
6 | ||
7 | This program is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 2 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | This program is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with this program; if not, write to the Free Software | |
19 | Foundation, Inc., 59 Temple Place - Suite 330, | |
20 | Boston, MA 02111-1307, USA. */ | |
21 | ||
22 | void dummy (int, int); | |
23 | int f1 (int); | |
24 | int f2 (int); | |
25 | ||
26 | int | |
27 | main (int argc, char **argv) | |
28 | { | |
29 | int i; | |
30 | i = f1 (4); | |
31 | i = f1 (i); | |
32 | dummy (0, i); | |
33 | return 0; | |
34 | } | |
35 | ||
36 | int | |
37 | f1 (int i) | |
38 | { | |
39 | #line 40 "step-line.c" | |
40 | dummy (1, i); | |
41 | #line 24 "step-line.inp" | |
42 | i = f2 (i); | |
43 | #line 44 "step-line.c" | |
44 | dummy (2, i); | |
45 | #line 25 "step-line.inp" | |
46 | i = f2 (i); | |
47 | #line 48 "step-line.c" | |
48 | dummy (3, i); | |
49 | #line 26 "step-line.inp" | |
50 | return i; | |
51 | #line 52 "step-line.c" | |
52 | } | |
53 | ||
54 | int | |
55 | f2 (int i) | |
56 | { | |
57 | #line 31 "step-line.inp" | |
58 | int j; | |
59 | #line 60 "step-line.c" | |
60 | dummy (4, i); | |
61 | #line 32 "step-line.inp" | |
62 | j = i; | |
63 | #line 64 "step-line.c" | |
64 | dummy (5, i); | |
65 | dummy (6, j); | |
66 | #line 33 "step-line.inp" | |
67 | j = j + 1; | |
68 | #line 69 "step-line.c" | |
69 | dummy (7, i); | |
70 | dummy (8, j); | |
71 | #line 34 "step-line.inp" | |
72 | j = j - i; | |
73 | #line 74 "step-line.c" | |
74 | dummy (9, i); | |
75 | dummy (10, j); | |
76 | #line 35 "step-line.inp" | |
77 | return i; | |
78 | #line 79 "step-line.c" | |
79 | } | |
80 | ||
81 | void | |
82 | dummy (int num, int i) | |
83 | { | |
84 | } |