1 /* Code to go along with tests in rtti.exp.
3 Copyright 2003, 2004 Free Software Foundation, Inc.
5 Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
37 class C1
: public Base1
{
49 D1::D1(C1
*expr_1
, C1
*expr_2
)
50 : expr_1_(expr_1
), expr_2_(expr_2
) { }
58 // NOTE: carlton/2004-01-23: This call exists only to convince GCC to
59 // keep around a reference to 'obj' in n2::func - GCC 3.4 had been
60 // optimizing it away.
61 void refer_to (n2::C2
*obj
)
66 void refer_to (n2::n3::C3
*obj
)
77 refer_to (obj
); // func-constructs-done
86 C3
*obj3
= create3 ();
88 refer_to (obj3
); // func3-constructs-done
103 n2::func(); // main-constructs-done