2006-12-08 Vladimir Prus <vladimir@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-var-cp.cc
1 /* Copyright 2006 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 void reference_update_tests ()
19 {
20 int x = 167;
21 int& rx = x;
22 x = 567;
23 x = 567;
24 }
25
26 struct S { int i; int j; };
27 struct S2 : S {};
28
29 int base_in_reference_test (S2& s2)
30 {
31 return s2.i;
32 }
33
34 void base_in_reference_test_main ()
35 {
36 S2 s;
37 s.i = 67;
38 s.j = 89;
39 base_in_reference_test (s);
40 }
41
42
43 int main ()
44 {
45 reference_update_tests ();
46 base_in_reference_test_main ();
47 return 0;
48 }
This page took 0.030564 seconds and 5 git commands to generate.