1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 2017-2023 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/>. */
20 /* A struct with many types of fields, in order to test 'ptype
25 /* Virtual destructor. */
29 /* 8-byte address. Because of the virtual destructor above, this
30 field's offset will be 8. */
35 /* 4-byte int bitfield of 1-bit. */
36 unsigned int field2
: 1;
38 /* 31-bit hole here. */
48 /* 7-byte hole here. */
53 /* We just print the offset and size of a union, ignoring its
64 /* Empty constructor. */
68 /* Typedef defined in-struct. */
69 typedef short my_int_type
;
74 /* This struct will be nested inside 'struct xyz'. */
85 /* This struct will be nested inside 'struct pqr'. */
98 /* A struct with a nested struct. */
109 /* A union with two nested structs. */
118 /* A struct with an union. */
131 /* A struct with bitfields. */
150 /* A struct with structs and unions. */
172 unsigned int f11
: 1;
173 unsigned int f12
: 1;
174 unsigned int f13
: 1;
175 unsigned int f14
: 1;
180 /* See PR c++/23373. */
184 static static_member Empty
;
188 /* Work around PR gcc/101452. */
189 static_member
static_member::Empty
;
198 main (int argc
, char *argv
[])
207 static_member stmember
;
208 empty_member emember
;