1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 2011-2019 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 static volatile int v
;
20 static void __attribute__((noinline
, noclone
))
26 static void __attribute__((noinline
, noclone
))
37 static void __attribute__((noinline
, noclone
))
41 asm ("breakhere_locexpr:");
44 static void __attribute__((noinline
, noclone
))
50 static void __attribute__((noinline
, noclone
))
56 static void __attribute__((noinline
, noclone
))
62 static void __attribute__((noinline
, noclone
))
68 static void __attribute__((noinline
, noclone
))
74 static void __attribute__((noinline
, noclone
))
80 static void __attribute__((noinline
, noclone
))
89 static void __attribute__((noinline
, noclone
))
95 static void __attribute__((noinline
, noclone
))
101 static void __attribute__((noinline
, noclone
)) self (int i
);
103 static void __attribute__((noinline
, noclone
))
109 static void __attribute__((noinline
, noclone
))
114 /* GCC would inline `self' as `cmovne' without the `self2' indirect. */
124 static void __attribute__((noinline
, noclone
))
125 stacktest (int r1
, int r2
, int r3
, int r4
, int r5
, int r6
, int s1
, int s2
,
126 double d1
, double d2
, double d3
, double d4
, double d5
, double d6
,
127 double d7
, double d8
, double d9
, double da
)
134 asm ("breakhere_stacktest:");
138 /* nodataparam has DW_AT_GNU_call_site_value but it does not have
139 DW_AT_GNU_call_site_data_value. GDB should not display dereferenced @entry
142 static void __attribute__((noinline
, noclone
))
143 reference (int ®param
, int &nodataparam
, int r3
, int r4
, int r5
, int r6
,
144 int &stackparam1
, int &stackparam2
)
146 int regcopy
= regparam
, nodatacopy
= nodataparam
;
147 int stackcopy1
= stackparam1
, stackcopy2
= stackparam2
;
154 asm ("breakhere_reference:");
158 static int *__attribute__((noinline
, noclone
))
166 static void __attribute__((noinline
, noclone
))
167 datap_input (int *datap
)
172 static int __attribute__((noinline
, noclone
))
178 static int __attribute__((noinline
, noclone
))
184 static int __attribute__((noinline
, noclone
))
189 asm ("breakhere_different:");
193 static int __attribute__((noinline
, noclone
))
194 validity (int lost
, int born
)
198 asm ("breakhere_validity:");
202 static void __attribute__((noinline
, noclone
))
206 asm ("breakhere_invalid:");
214 stacktest (1, 2, 3, 4, 5, 6, 11, 12,
215 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 11.5, 12.5);
217 validity (5, data ());
221 int regvar
= 1, *nodatavarp
= datap (), stackvar1
= 11, stackvar2
= 12;
222 reference (regvar
, *nodatavarp
, 3, 4, 5, 6, stackvar1
, stackvar2
);
223 datap_input (nodatavarp
);