1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 2003-2016 Free Software Foundation, Inc.
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 3 of the License, or
8 (at your option) any later version.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 extern void foo2 (); /* from derivation2.cc */
21 typedef double value_type;
22 struct Base { typedef int value_type; };
23 struct Derived : public Base {
24 void doit (void) const {
35 typedef int value_type;
84 class D : private A, public B, protected C {
100 class E : public A, B, protected C {
116 class F : A, public B, C {
131 class G : private A, public B, protected C {
156 typedef float value_type;
178 class V_inter : public virtual V_base
190 class V_derived : public V_inter
198 A::value_type A::afoo() {
202 A::value_type B::bfoo() {
206 A::value_type C::cfoo() {
210 D::value_type D::dfoo() {
214 E::value_type E::efoo() {
218 F::value_type F::ffoo() {
226 A::value_type A::foo()
232 A::value_type B::foo()
238 A::value_type C::foo()
244 D::value_type D::foo()
250 E::value_type E::foo()
256 F::value_type F::foo()
287 marker1(); // marker1-returns-here
289 a_instance.a = 20; // marker1-returns-here
304 zz_instance.zz = 35.0;
307 N::Derived::value_type d = 1;
308 N::value_type n = 3.0;