binutils-gdb/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.c
Tom Tromey 70728e1d39 Handle half-float in 'x' command
Using 'x/hf' should print bytes as float16, but instead it currently
prints as an integer.  I tracked this down to a missing case in
float_type_from_length.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30161
Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-03-02 08:49:37 -07:00

26 lines
877 B
C

/* This testcase is part of GDB, the GNU debugger.
Copyright 2023 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Storage for the 'x' test. */
unsigned char storage[2];
int
main()
{
asm ("main_label: .globl main_label");
return 0;
}