]>
Commit | Line | Data |
---|---|---|
ef220b33 MC |
1 | /* This test script is part of GDB, the GNU debugger. |
2 | ||
6aba47ca | 3 | Copyright 1999, 2004, 2007 Free Software Foundation, Inc. |
ef220b33 MC |
4 | |
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 2 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program; if not, write to the Free Software | |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
18 | */ | |
19 | ||
a0b3c4fd JM |
20 | int main2(void); |
21 | ||
c906108c SS |
22 | void marker1 (void) |
23 | { | |
24 | ||
25 | } | |
26 | ||
27 | ||
28 | ||
29 | int main(void) | |
30 | { | |
31 | short s; | |
32 | short &rs = s; | |
33 | short *ps; | |
34 | short *&rps = ps; | |
35 | short as[4]; | |
36 | short (&ras)[4] = as; | |
37 | s = -1; | |
38 | ps = &s; | |
39 | as[0] = 0; | |
40 | as[1] = 1; | |
41 | as[2] = 2; | |
42 | as[3] = 3; | |
43 | ||
44 | #ifdef usestubs | |
45 | set_debug_traps(); | |
46 | breakpoint(); | |
47 | #endif | |
48 | marker1(); | |
a0b3c4fd JM |
49 | |
50 | main2(); | |
51 | ||
52 | return 0; | |
53 | } | |
54 | ||
55 | int f() | |
56 | { | |
57 | int f1; | |
58 | f1 = 1; | |
59 | return f1; | |
60 | } | |
61 | ||
62 | int main2(void) | |
63 | { | |
64 | char C; | |
65 | unsigned char UC; | |
66 | short S; | |
67 | unsigned short US; | |
68 | int I; | |
69 | unsigned int UI; | |
70 | long L; | |
71 | unsigned long UL; | |
72 | float F; | |
73 | double D; | |
74 | char &rC = C; | |
75 | unsigned char &rUC = UC; | |
76 | short &rS = S; | |
77 | unsigned short &rUS = US; | |
78 | int &rI = I; | |
79 | unsigned int &rUI = UI; | |
80 | long &rL = L; | |
81 | unsigned long &rUL = UL; | |
82 | float &rF = F; | |
83 | double &rD = D; | |
84 | C = 'A'; | |
85 | UC = 21; | |
86 | S = -14; | |
87 | US = 7; | |
88 | I = 102; | |
89 | UI = 1002; | |
90 | L = -234; | |
91 | UL = 234; | |
92 | F = 1.25E10; | |
93 | D = -1.375E-123; | |
94 | I = f(); | |
95 | ||
c906108c | 96 | return 0; |
a0b3c4fd | 97 | |
c906108c | 98 | } |