Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / lib-types.cc
CommitLineData
0e3509db
DE
1/* This testcase is part of GDB, the GNU debugger.
2
88b9d363 3 Copyright 2010-2022 Free Software Foundation, Inc.
0e3509db
DE
4
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.
9
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.
14
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/>. */
17
18class class1
19{
20 public:
21 class1 (int _x) : x (_x) {}
22 int x;
23};
24
25class1 class1_obj (42);
26const class1 const_class1_obj (42);
27volatile class1 volatile_class1_obj (42);
28const volatile class1 const_volatile_class1_obj (42);
29
30typedef class1 typedef_class1;
31
32typedef_class1 typedef_class1_obj (42);
33
34class1& class1_ref_obj (class1_obj);
35
36typedef const typedef_class1 typedef_const_typedef_class1;
37
38typedef_const_typedef_class1 typedef_const_typedef_class1_obj (42);
39
40typedef typedef_const_typedef_class1& typedef_const_typedef_class1_ref;
41
42typedef_const_typedef_class1_ref typedef_const_typedef_class1_ref_obj (typedef_const_typedef_class1_obj);
43
44class subclass1 : public class1
45{
46 public:
47 subclass1 (int _x, int _y) : class1 (_x), y (_y) {}
48 int y;
49};
50
51subclass1 subclass1_obj (42, 43);
52
53enum enum1 { A, B, C };
54
55enum1 enum1_obj (A);
56
ab964825
PK
57struct A
58{
59 int a;
60 union {
61 int b0;
62 int b1;
63 union {
64 int bb0;
65 int bb1;
66 union {
67 int bbb0;
68 int bbb1;
69 };
70 };
71 };
72 int c;
73 union {
74 union {
75 int dd0;
76 int dd1;
77 };
78 int d2;
79 int d3;
80 };
81};
82
83struct A a = {1,20,3,40};
84
0e3509db
DE
85int
86main ()
87{
88 return 0;
89}
This page took 1.348513 seconds and 4 git commands to generate.