Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.guile / scm-type.c
CommitLineData
ed3ef339
DE
1/* This testcase is part of GDB, the GNU debugger.
2
88b9d363 3 Copyright 2009-2022 Free Software Foundation, Inc.
ed3ef339
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
e25d6d93
SM
18#include <stdlib.h>
19
ed3ef339
DE
20struct s
21{
22 int a;
23 int b;
24};
25
26typedef struct s TS;
27TS ts;
28
29#ifdef __cplusplus
30struct C
31{
32 int c;
33 int d;
34};
35
36struct D : C
37{
38 int e;
39 int f;
40};
41
42template<typename T, int I, int C::*MP>
43struct Temargs
44{
45};
46
47Temargs<D, 23, &C::c> temvar;
48
49#endif
50
51enum E
52{ v1, v2, v3
53};
54
55struct s vec_data_1 = {1, 1};
56struct s vec_data_2 = {1, 2};
57
e25d6d93
SM
58struct flex_member
59{
60 int n;
61 int items[];
62};
63
ed3ef339
DE
64int
65main ()
66{
67 int ar[2] = {1,2};
68 struct s st;
69#ifdef __cplusplus
70 C c;
71 c.c = 1;
72 c.d = 2;
73 D d;
74 d.e = 3;
75 d.f = 4;
76#endif
77 enum E e;
78
79 st.a = 3;
80 st.b = 5;
81
82 e = v2;
e25d6d93
SM
83
84 struct flex_member *f = (struct flex_member *) malloc (100);
85 f->items[0] = 111;
86 f->items[1] = 222;
ed3ef339
DE
87
88 return 0; /* break to inspect struct and array. */
89}
This page took 0.95202 seconds and 4 git commands to generate.