Automatic date update in version.in
[binutils-gdb/blckswan.git] / gdb / testsuite / gdb.python / py-mi-var-info-path-expression.c
blobd5312cb114eda6dfe34bb666c64a917d6b8ad256
1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright (C) 2018-2022 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/>. */
18 enum cons_type
20 type_atom = 0,
21 type_cons = 1
24 struct atom
26 int ival;
29 struct cons
31 enum cons_type type;
32 union
34 struct atom atom;
35 struct cons *slots[2];
39 #define nil ((struct cons*)0);
41 int
42 main ()
44 struct cons c1, c2, c3, c4;
46 c1.type = type_cons;
47 c1.slots[0] = &c4;
48 c1.slots[1] = &c2;
50 c2.type = type_cons;
51 c2.slots[0] = nil;
52 c2.slots[1] = &c3;
54 c3.type = type_cons;
55 c3.slots[0] = nil;
56 c3.slots[1] = nil;
58 c4.type = type_atom;
59 c4.atom.ival = 13;
61 return 0; /* next line */