1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 2014-2017 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/>. */
27 int operator+ (const A &obj);
28 int operator- (const A &obj);
29 virtual int geta (void);
37 A::operator+ (const A &obj)
46 A::operator- (const A &obj)
64 virtual int geta (void);
83 /* This class has a member named 'a', while the base class also has a
84 member named 'a'. When one invokes A::geta(), A::a should be
85 returned and not E::a as the 'geta' method is defined on class 'A'.
86 This class tests this aspect of debug methods. */
94 template <typename T1>
100 template <typename T1>
109 template <typename T>
110 template <typename T1>
115 return sizeof (T1) - sizeof (T);
120 template <typename T>
126 return M * sizeof (T);
131 template <typename T>
132 template <typename T1>
134 G<T>::mul (const T1 t1)
170 int diff = g.size_diff<float> ();
171 int smul = g.size_mul<2> ();
172 int mul = g.mul (1.0);
174 for (int i = 0; i < 10; i++)
176 a1.array[i] = a2.array[i] = b1.array[i] = i;
179 return 0; /* Break here. */