1/* This testcase is part of GDB, the GNU debugger.
2
3   Copyright 2017-2023 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#define ABI1 __attribute__ ((abi_tag ("tag1")))
19#define ABI2 __attribute__ ((abi_tag ("tag2")))
20#define ABI3 __attribute__ ((abi_tag ("tag3")))
21
22void ABI1
23test_abi_tag_function (int)
24{
25}
26
27void ABI1
28test_abi_tag_ovld_function ()
29{
30}
31
32void ABI1
33test_abi_tag_ovld_function (int)
34{
35}
36
37/* Code for the overload functions, different ABI tag test.  */
38
39void
40test_abi_tag_ovld2_function ()
41{
42}
43
44void ABI1
45test_abi_tag_ovld2_function (short)
46{
47}
48
49void ABI2
50test_abi_tag_ovld2_function (int)
51{
52}
53
54void ABI2
55test_abi_tag_ovld2_function (long)
56{
57}
58
59struct ABI1 test_abi_tag_struct
60{
61  ABI2 test_abi_tag_struct ();
62  ABI2 ~test_abi_tag_struct ();
63};
64
65test_abi_tag_struct::test_abi_tag_struct ()
66{}
67
68test_abi_tag_struct::~test_abi_tag_struct ()
69{}
70
71ABI3 test_abi_tag_struct s;
72
73/* Code for the abi-tag in parameters test.  */
74
75struct ABI2 abi_tag_param_struct1
76{};
77
78struct ABI2 abi_tag_param_struct2
79{};
80
81void
82test_abi_tag_in_params (abi_tag_param_struct1)
83{}
84
85void
86test_abi_tag_in_params (abi_tag_param_struct1, abi_tag_param_struct2)
87{}
88
89int
90main ()
91{
92  return 0;
93}
94