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