* dw2gencfi.c (dot_cfi_dummy): New.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.opencl / datatypes.exp
CommitLineData
7b6bb8da 1# Copyright 2010, 2011 Free Software Foundation, Inc.
f4b8a18d
KW
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>. */
15#
16# Contributed by Ken Werner <ken.werner@de.ibm.com>.
17#
18# Tests OpenCL data types.
19
20if $tracelevel {
21 strace $tracelevel
22}
23
24load_lib opencl.exp
25
26if { [skip_opencl_tests] } {
27 return 0
28}
29
30set testfile "datatypes"
31set clprogram [remote_download target ${srcdir}/${subdir}/${testfile}.cl]
32
33# Compile the generic OpenCL host app
34if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
35 untested ${testfile}.exp
36 return -1
37}
38
39gdb_exit
40gdb_start
41
42# Manually switch the language to opencl
43gdb_test_no_output "set language opencl" "No prompt when setting the language to opencl"
44
45# Check OpenCL data types (GDB)
46gdb_test "whatis bool" "type = bool"
47gdb_test "p sizeof(bool)" " = 4"
48
49gdb_test "whatis char" "type = char"
50gdb_test "p sizeof(char)" " = 1"
51gdb_test "whatis char2" "type = char2"
52gdb_test "p sizeof(char2)" " = 2"
53gdb_test "whatis char3" "type = char3"
54gdb_test "p sizeof(char3)" " = 4"
55gdb_test "whatis char4" "type = char4"
56gdb_test "p sizeof(char4)" " = 4"
57gdb_test "whatis char8" "type = char8"
58gdb_test "p sizeof(char8)" " = 8"
59gdb_test "whatis char16" "type = char16"
60gdb_test "p sizeof(char16)" " = 16"
61
62gdb_test "whatis unsigned char" "type = unsigned char"
63gdb_test "p sizeof(unsigned char)" " = 1"
64gdb_test "whatis uchar" "type = uchar"
65gdb_test "p sizeof(uchar)" " = 1"
66gdb_test "whatis uchar2" "type = uchar2"
67gdb_test "p sizeof(uchar2)" " = 2"
68gdb_test "whatis uchar3" "type = uchar3"
69gdb_test "p sizeof(uchar3)" " = 4"
70gdb_test "whatis uchar4" "type = uchar4"
71gdb_test "p sizeof(uchar4)" " = 4"
72gdb_test "whatis uchar8" "type = uchar8"
73gdb_test "p sizeof(uchar8)" " = 8"
74gdb_test "whatis uchar16" "type = uchar16"
75gdb_test "p sizeof(uchar16)" " = 16"
76
77gdb_test "whatis short" "type = short"
78gdb_test "p sizeof(short)" " = 2"
79gdb_test "whatis short2" "type = short2"
80gdb_test "p sizeof(short2)" " = 4"
81gdb_test "whatis short3" "type = short3"
82gdb_test "p sizeof(short3)" " = 8"
83gdb_test "whatis short4" "type = short4"
84gdb_test "p sizeof(short4)" " = 8"
85gdb_test "whatis short8" "type = short8"
86gdb_test "p sizeof(short8)" " = 16"
87gdb_test "whatis short16" "type = short16"
88gdb_test "p sizeof(short16)" " = 32"
89
90gdb_test "whatis unsigned short" "type = unsigned short"
91gdb_test "p sizeof(unsigned short)" " = 2"
92gdb_test "whatis ushort" "type = ushort"
93gdb_test "p sizeof(ushort)" " = 2"
94gdb_test "whatis ushort2" "type = ushort2"
95gdb_test "p sizeof(ushort2)" " = 4"
96gdb_test "whatis ushort3" "type = ushort3"
97gdb_test "p sizeof(ushort3)" " = 8"
98gdb_test "whatis ushort4" "type = ushort4"
99gdb_test "p sizeof(ushort4)" " = 8"
100gdb_test "whatis ushort8" "type = ushort8"
101gdb_test "p sizeof(ushort8)" " = 16"
102gdb_test "whatis ushort16" "type = ushort16"
103gdb_test "p sizeof(ushort16)" " = 32"
104
105gdb_test "whatis int" "type = int"
106gdb_test "p sizeof(int)" " = 4"
107gdb_test "whatis int2" "type = int2"
108gdb_test "p sizeof(int2)" " = 8"
109gdb_test "whatis int3" "type = int3"
110gdb_test "p sizeof(int3)" " = 16"
111gdb_test "whatis int4" "type = int4"
112gdb_test "p sizeof(int4)" " = 16"
113gdb_test "whatis int8" "type = int8"
114gdb_test "p sizeof(int8)" " = 32"
115gdb_test "whatis int16" "type = int16"
116gdb_test "p sizeof(int16)" " = 64"
117
118gdb_test "whatis unsigned int" "type = unsigned int"
119gdb_test "p sizeof(unsigned int)" " = 4"
120gdb_test "whatis uint" "type = uint"
121gdb_test "p sizeof(uint)" " = 4"
122gdb_test "whatis uint2" "type = uint2"
123gdb_test "p sizeof(uint2)" " = 8"
124gdb_test "whatis uint3" "type = uint3"
125gdb_test "p sizeof(uint3)" " = 16"
126gdb_test "whatis uint4" "type = uint4"
127gdb_test "p sizeof(uint4)" " = 16"
128gdb_test "whatis uint8" "type = uint8"
129gdb_test "p sizeof(uint8)" " = 32"
130gdb_test "whatis uint16" "type = uint16"
131gdb_test "p sizeof(uint16)" " = 64"
132
133gdb_test "whatis long" "type = long"
134gdb_test "p sizeof(long)" " = 8"
135gdb_test "whatis long2" "type = long2"
136gdb_test "p sizeof(long2)" " = 16"
137gdb_test "whatis long3" "type = long3"
138gdb_test "p sizeof(long3)" " = 32"
139gdb_test "whatis long4" "type = long4"
140gdb_test "p sizeof(long4)" " = 32"
141gdb_test "whatis long8" "type = long8"
142gdb_test "p sizeof(long8)" " = 64"
143gdb_test "whatis long16" "type = long16"
144gdb_test "p sizeof(long16)" " = 128"
145
146gdb_test "whatis unsigned long" "type = unsigned long"
147gdb_test "p sizeof(unsigned long)" " = 8"
148gdb_test "whatis ulong" "type = ulong"
149gdb_test "p sizeof(ulong)" " = 8"
150gdb_test "whatis ulong2" "type = ulong2"
151gdb_test "p sizeof(ulong2)" " = 16"
152gdb_test "whatis ulong3" "type = ulong3"
153gdb_test "p sizeof(ulong3)" " = 32"
154gdb_test "whatis ulong4" "type = ulong4"
155gdb_test "p sizeof(ulong4)" " = 32"
156gdb_test "whatis ulong8" "type = ulong8"
157gdb_test "p sizeof(ulong8)" " = 64"
158gdb_test "whatis ulong16" "type = ulong16"
159gdb_test "p sizeof(ulong16)" " = 128"
160
161gdb_test "whatis half" "type = half"
162gdb_test "p sizeof(half)" " = 2"
163gdb_test "whatis half2" "type = half2"
164gdb_test "p sizeof(half2)" " = 4"
165gdb_test "whatis half3" "type = half3"
166gdb_test "p sizeof(half3)" " = 8"
167gdb_test "whatis half4" "type = half4"
168gdb_test "p sizeof(half4)" " = 8"
169gdb_test "whatis half8" "type = half8"
170gdb_test "p sizeof(half8)" " = 16"
171gdb_test "whatis half16" "type = half16"
172gdb_test "p sizeof(half16)" " = 32"
173
174gdb_test "whatis float" "type = float"
175gdb_test "p sizeof(float)" " = 4"
176gdb_test "whatis float2" "type = float2"
177gdb_test "p sizeof(float2)" " = 8"
178gdb_test "whatis float3" "type = float3"
179gdb_test "p sizeof(float3)" " = 16"
180gdb_test "whatis float4" "type = float4"
181gdb_test "p sizeof(float4)" " = 16"
182gdb_test "whatis float8" "type = float8"
183gdb_test "p sizeof(float8)" " = 32"
184gdb_test "whatis float16" "type = float16"
185gdb_test "p sizeof(float16)" " = 64"
186
187gdb_test "whatis double" "type = double"
188gdb_test "p sizeof(double)" " = 8"
189gdb_test "whatis double2" "type = double2"
190gdb_test "p sizeof(double2)" " = 16"
191gdb_test "whatis double3" "type = double3"
192gdb_test "p sizeof(double3)" " = 32"
193gdb_test "whatis double4" "type = double4"
194gdb_test "p sizeof(double4)" " = 32"
195gdb_test "whatis double8" "type = double8"
196gdb_test "p sizeof(double8)" " = 64"
197gdb_test "whatis double16" "type = double16"
198gdb_test "p sizeof(double16)" " = 128"
199
200# Set the language back to the default: "auto; currently c"
201gdb_test_no_output "set language c" "No prompt when setting the language to c"
202gdb_test_no_output "set language auto" "No prompt when setting the language to auto"
203
204# Load the OpenCL app
205gdb_reinitialize_dir $srcdir/$subdir
206gdb_load ${objdir}/${subdir}/${testfile}
207
208# Set breakpoint at the OpenCL kernel
b2030fb5 209gdb_test "tbreak testkernel" \
d468832a
KW
210 "" \
211 "Set pending breakpoint" \
212 ".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" \
213 "y"
f4b8a18d
KW
214
215gdb_run_cmd
b2030fb5 216gdb_test "" ".*reakpoint.*1.*testkernel.*" "run"
f4b8a18d 217
d468832a
KW
218# Continue to the marker
219gdb_breakpoint [gdb_get_line_number "marker" "${clprogram}"]
220gdb_continue_to_breakpoint "marker"
221
f4b8a18d
KW
222# Check if the language was switched to opencl
223gdb_test "show language" "The current source language is \"auto; currently opencl\"\."
224
225# Retrieve some information about the OpenCL version and the availability of extensions
226set opencl_version [get_integer_valueof "opencl_version" 0]
227set have_cl_khr_fp64 [get_integer_valueof "have_cl_khr_fp64" 0]
228set have_cl_khr_fp16 [get_integer_valueof "have_cl_khr_fp16" 0]
229
230# Check OpenCL data types (DWARF)
231gdb_test "whatis b" "type = bool"
232gdb_test "p sizeof(b)" " = 4"
233gdb_test "print b" " = 0"
234
235gdb_test "whatis c" "type = char"
236gdb_test "p sizeof(c)" " = 1"
237gdb_test "print/d c" " = 1"
238gdb_test "whatis c2" "type = char \\\[2\\\]"
239gdb_test "p sizeof(c2)" " = 2"
240gdb_test "print c2" " = \\{1, 2\\}"
241if { ${opencl_version} >= 110 } {
242 gdb_test "whatis c3" "type = char \\\[3\\\]"
243 gdb_test "p sizeof(c3)" " = 4"
244 gdb_test "print c3" " = \\{1, 2, 3\\}"
245}
246gdb_test "whatis c4" "type = char \\\[4\\\]"
247gdb_test "p sizeof(c4)" " = 4"
248gdb_test "print c4" " = \\{1, 2, 3, 4\\}"
249gdb_test "whatis c8" "type = char \\\[8\\\]"
250gdb_test "p sizeof(c8)" " = 8"
251gdb_test "print c8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
252gdb_test "whatis c16" "type = char \\\[16\\\]"
253gdb_test "p sizeof(c16)" " = 16"
254gdb_test "print c16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
255
256gdb_test "whatis uc" "type = (uchar|unsigned char)"
257gdb_test "p sizeof(uc)" " = 1"
258gdb_test "print/d uc" " = 1"
259gdb_test "whatis uc2" "type = (uchar|unsigned char) \\\[2\\\]"
260gdb_test "p sizeof(uc2)" " = 2"
261gdb_test "print uc2" " = \\{1, 2\\}"
262if { ${opencl_version} >= 110 } {
263 gdb_test "whatis uc3" "type = (uchar|unsigned char) \\\[3\\\]"
264 gdb_test "p sizeof(uchar3)" " = 4"
265 gdb_test "print uc3" " = \\{1, 2, 3\\}"
266}
267gdb_test "whatis uc4" "type = (uchar|unsigned char) \\\[4\\\]"
268gdb_test "p sizeof(uc4)" " = 4"
269gdb_test "print uc4" " = \\{1, 2, 3, 4\\}"
270gdb_test "whatis uc8" "type = (uchar|unsigned char) \\\[8\\\]"
271gdb_test "p sizeof(uc8)" " = 8"
272gdb_test "print uc8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
273gdb_test "whatis uc16" "type = (uchar|unsigned char) \\\[16\\\]"
274gdb_test "p sizeof(uc16)" " = 16"
275gdb_test "print uc16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
276
277gdb_test "whatis s" "type = short"
278gdb_test "p sizeof(s)" " = 2"
279gdb_test "print s" " = -1"
280gdb_test "whatis s2" "type = short \\\[2\\\]"
281gdb_test "p sizeof(s2)" " = 4"
282gdb_test "print s2" " = \\{-1, -2\\}"
283if { ${opencl_version} >= 110 } {
284 gdb_test "whatis s3" "type = short \\\[3\\\]"
285 gdb_test "p sizeof(s3)" " = 8"
286 gdb_test "print s3" " = \\{-1, -2, -3\\}"
287}
288gdb_test "whatis s4" "type = short \\\[4\\\]"
289gdb_test "p sizeof(s4)" " = 8"
290gdb_test "print s4" " = \\{-1, -2, -3, -4\\}"
291gdb_test "whatis s8" "type = short \\\[8\\\]"
292gdb_test "p sizeof(s8)" " = 16"
293gdb_test "print s8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}"
294gdb_test "whatis s16" "type = short \\\[16\\\]"
295gdb_test "p sizeof(s16)" " = 32"
296gdb_test "print s16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}"
297
298gdb_test "whatis us" "type = (ushort|unsigned short)"
299gdb_test "p sizeof(us)" " = 2"
300gdb_test "print us" " = 1"
301gdb_test "whatis us2" "type = (ushort|unsigned short) \\\[2\\\]"
302gdb_test "p sizeof(us2)" " = 4"
303gdb_test "print us2" " = \\{1, 2\\}"
304if { ${opencl_version} >= 110 } {
305 gdb_test "whatis us3" "type = (ushort|unsigned short) \\\[3\\\]"
306 gdb_test "p sizeof(us3)" " = 8"
307 gdb_test "print us3" " = \\{1, 2, 3\\}"
308}
309gdb_test "whatis us4" "type = (ushort|unsigned short) \\\[4\\\]"
310gdb_test "p sizeof(us4)" " = 8"
311gdb_test "print us4" " = \\{1, 2, 3, 4\\}"
312gdb_test "whatis us8" "type = (ushort|unsigned short) \\\[8\\\]"
313gdb_test "p sizeof(us8)" " = 16"
314gdb_test "print us8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
315gdb_test "whatis us16" "type = (ushort|unsigned short) \\\[16\\\]"
316gdb_test "p sizeof(us16)" " = 32"
317gdb_test "print us16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
318
319gdb_test "whatis i" "type = int"
320gdb_test "p sizeof(i)" " = 4"
321gdb_test "print i" " = -1"
322gdb_test "whatis i2" "type = int \\\[2\\\]"
323gdb_test "p sizeof(i2)" " = 8"
324gdb_test "print i2" " = \\{-1, -2\\}"
325if { ${opencl_version} >= 110 } {
326 gdb_test "whatis i3" "type = int \\\[3\\\]"
327 gdb_test "p sizeof(i3)" " = 16"
328 gdb_test "print i3" " = \\{-1, -2, -3\\}"
329}
330gdb_test "whatis i4" "type = int \\\[4\\\]"
331gdb_test "p sizeof(i4)" " = 16"
332gdb_test "print i4" " = \\{-1, -2, -3, -4\\}"
333gdb_test "whatis i8" "type = int \\\[8\\\]"
334gdb_test "p sizeof(i8)" " = 32"
335gdb_test "print i8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}"
336gdb_test "whatis i16" "type = int \\\[16\\\]"
337gdb_test "p sizeof(i16)" " = 64"
338gdb_test "print i16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}"
339
340gdb_test "whatis ui" "type = (uint|unsigned int)"
341gdb_test "p sizeof(ui)" " = 4"
342gdb_test "print ui" " = 1"
343gdb_test "whatis ui2" "type = (uint|unsigned int) \\\[2\\\]"
344gdb_test "p sizeof(ui2)" " = 8"
345gdb_test "print ui2" " = \\{1, 2\\}"
346if { ${opencl_version} >= 110 } {
347 gdb_test "whatis ui3" "type = (uint|unsigned int) \\\[3\\\]"
348 gdb_test "p sizeof(ui3)" " = 16"
349 gdb_test "print ui3" " = \\{1, 2, 3\\}"
350}
351gdb_test "whatis ui4" "type = (uint|unsigned int) \\\[4\\\]"
352gdb_test "p sizeof(ui4)" " = 16"
353gdb_test "print ui4" " = \\{1, 2, 3, 4\\}"
354gdb_test "whatis ui8" "type = (uint|unsigned int) \\\[8\\\]"
355gdb_test "p sizeof(ui8)" " = 32"
356gdb_test "print ui8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
357gdb_test "whatis ui16" "type = (uint|unsigned int) \\\[16\\\]"
358gdb_test "p sizeof(ui16)" " = 64"
359gdb_test "print ui16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
360
361gdb_test "whatis l" "type = long"
362gdb_test "p sizeof(l)" " = 8"
363gdb_test "print l" " = -1"
364gdb_test "whatis l2" "type = long \\\[2\\\]"
365gdb_test "p sizeof(l2)" " = 16"
366gdb_test "print l2" " = \\{-1, -2\\}"
367if { ${opencl_version} >= 110 } {
368 gdb_test "whatis l3" "type = long \\\[3\\\]"
369 gdb_test "p sizeof(l3)" " = 32"
370 gdb_test "print l3" " = \\{-1, -2, -3\\}"
371}
372gdb_test "whatis l4" "type = long \\\[4\\\]"
373gdb_test "p sizeof(l4)" " = 32"
374gdb_test "print l4" " = \\{-1, -2, -3, -4\\}"
375gdb_test "whatis l8" "type = long \\\[8\\\]"
376gdb_test "p sizeof(l8)" " = 64"
377gdb_test "print l8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}"
378gdb_test "whatis l16" "type = long \\\[16\\\]"
379gdb_test "p sizeof(l16)" " = 128"
380gdb_test "print l16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}"
381
382gdb_test "whatis ul" "type = (ulong|unsigned long)"
383gdb_test "p sizeof(ul)" " = 8"
384gdb_test "print ul" " = 1"
385gdb_test "whatis ul2" "type = (ulong|unsigned long) \\\[2\\\]"
386gdb_test "p sizeof(ul2)" " = 16"
387gdb_test "print ul2" " = \\{1, 2\\}"
388if { ${opencl_version} >= 110 } {
389 gdb_test "whatis ul3" "type = (ulong|unsigned long) \\\[3\\\]"
390 gdb_test "p sizeof(ul3)" " = 32"
391 gdb_test "print ul3" " = \\{1, 2, 3\\}"
392}
393gdb_test "whatis ul4" "type = (ulong|unsigned long) \\\[4\\\]"
394gdb_test "p sizeof(ul4)" " = 32"
395gdb_test "print ul4" " = \\{1, 2, 3, 4\\}"
396gdb_test "whatis ul8" "type = (ulong|unsigned long) \\\[8\\\]"
397gdb_test "p sizeof(ul8)" " = 64"
398gdb_test "print ul8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
399gdb_test "whatis ul16" "type = (ulong|unsigned long) \\\[16\\\]"
400gdb_test "p sizeof(ul16)" " = 128"
401gdb_test "print ul16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
402
403gdb_test "whatis ph" "type = half *"
404gdb_test "whatis *ph" "type = half"
405gdb_test "p sizeof(*ph)" " = 2"
406
407if { ${have_cl_khr_fp16} } {
408 gdb_test "whatis h" "type = half"
409 gdb_test "p sizeof(h)" " = 2"
410 gdb_test "print h" " = 1"
411 gdb_test "whatis h2" "type = half \\\[2\\\]"
412 gdb_test "p sizeof(h2)" " = 4"
413 gdb_test "print h2" " = \\{1, 2\\}"
414 if { ${opencl_version} >= 110 } {
415 gdb_test "whatis h3" "type = half \\\[3\\\]"
416 gdb_test "p sizeof(h3)" " = 8"
417 gdb_test "print h3" " = \\{1, 2, 3\\}"
418 }
419 gdb_test "whatis h4" "type = half \\\[4\\\]"
420 gdb_test "p sizeof(h4)" " = 8"
421 gdb_test "print h4" " = \\{1, 2, 3, 4\\}"
422 gdb_test "whatis h8" "type = half \\\[8\\\]"
423 gdb_test "p sizeof(h8)" " = 16"
424 gdb_test "print h8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
425 gdb_test "whatis h16" "type = half \\\[16\\\]"
426 gdb_test "p sizeof(h16)" " = 16"
427 gdb_test "print h16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
428}
429
430gdb_test "whatis f" "type = float"
431gdb_test "p sizeof(f)" " = 4"
432gdb_test "print f" " = 1"
433gdb_test "whatis f2" "type = float \\\[2\\\]"
434gdb_test "p sizeof(f2)" " = 8"
435gdb_test "print f2" " = \\{1, 2\\}"
436if { ${opencl_version} >= 110 } {
437 gdb_test "whatis f3" "type = float \\\[3\\\]"
438 gdb_test "p sizeof(f3)" " = 16"
439 gdb_test "print f3" " = \\{1, 2, 3\\}"
440}
441gdb_test "whatis f4" "type = float \\\[4\\\]"
442gdb_test "p sizeof(f4)" " = 16"
443gdb_test "print f4" " = \\{1, 2, 3, 4\\}"
444gdb_test "whatis f8" "type = float \\\[8\\\]"
445gdb_test "p sizeof(f8)" " = 32"
446gdb_test "print f8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
447gdb_test "whatis f16" "type = float \\\[16\\\]"
448gdb_test "p sizeof(f16)" " = 64"
449gdb_test "print f16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
450
451if { ${have_cl_khr_fp64} } {
452 gdb_test "whatis d" "type = double"
453 gdb_test "p sizeof(d)" " = 8"
454 gdb_test "print d" " = 1"
455 gdb_test "whatis d2" "type = double \\\[2\\\]"
456 gdb_test "p sizeof(d2)" " = 16"
457 gdb_test "print d2" " = \\{1, 2\\}"
458 if { ${opencl_version} >= 110 } {
459 gdb_test "whatis d3" "type = double \\\[3\\\]"
460 gdb_test "p sizeof(d3)" " = 32"
461 gdb_test "print d3" " = \\{1, 2, 3\\}"
462 }
463 gdb_test "whatis d4" "type = double \\\[4\\\]"
464 gdb_test "p sizeof(d4)" " = 32"
465 gdb_test "print d4" " = \\{1, 2, 3, 4\\}"
466 gdb_test "whatis d8" "type = double \\\[8\\\]"
467 gdb_test "p sizeof(d8)" " = 64"
468 gdb_test "print d8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
469 gdb_test "whatis d16" "type = double \\\[16\\\]"
470 gdb_test "p sizeof(d16)" " = 128"
471 gdb_test "print d16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
472}
473
474# Delete the OpenCL program source
475remote_file target delete ${clprogram}
This page took 0.068537 seconds and 4 git commands to generate.