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