]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.cp/step-and-next-inline.cc
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cp / step-and-next-inline.cc
CommitLineData
8c95582d
AB
1/* This testcase is part of GDB, the GNU debugger.
2
213516ef 3 Copyright 2019-2023 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#ifdef USE_NEXT_INLINE_H
19
20#include "step-and-next-inline.h"
21
22#else /* USE_NEXT_INLINE_H */
23
24/* The code below must remain identical to the code in
25 step-and-next-inline.h. */
26
27#include <stdlib.h>
28
29struct tree
30{
31 volatile int x;
32 volatile int z;
33};
34
35#define TREE_TYPE(NODE) (*tree_check (NODE, 0))
36
37inline tree *
38tree_check (tree *t, int i)
39{
40 if (t->x != i)
41 abort();
42 tree *x = t;
43 return x;
5f335689 44} // tree-check
8c95582d
AB
45
46#endif /* USE_NEXT_INLINE_H */
47
48int __attribute__((noinline, noclone))
49get_alias_set (tree *t)
50{
51 if (t != NULL
52 && TREE_TYPE (t).z != 1
53 && TREE_TYPE (t).z != 2
54 && TREE_TYPE (t).z != 3)
55 return 0;
56 return 1;
5f335689 57} // get_alias_set
8c95582d
AB
58
59tree xx;
60
61int
62main()
63{
e3e4224e 64 get_alias_set (&xx); /* Beginning of main */
8c95582d 65 return 0;
5f335689 66} // main