]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.cp/step-and-next-inline.h
[gdb/testsuite] Fix gdb.cp/step-and-next-inline.exp with gcc-11
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cp / step-and-next-inline.h
CommitLineData
8c95582d
AB
1/* This testcase is part of GDB, the GNU debugger.
2
3666a048 3 Copyright 2019-2021 Free Software Foundation, Inc.
8c95582d
AB
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/* The code below must remain identical to the block of code in
19 step-and-next-inline.cc. */
20
21#include <stdlib.h>
22
23struct tree
24{
25 volatile int x;
26 volatile int z;
27};
28
29#define TREE_TYPE(NODE) (*tree_check (NODE, 0))
30
31inline tree *
32tree_check (tree *t, int i)
33{
34 if (t->x != i)
35 abort();
36 tree *x = t;
37 return x;
5f335689 38} // tree_check