summaryrefslogtreecommitdiff
path: root/gdb/gdbarch-selftests.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbarch-selftests.c')
-rw-r--r--gdb/gdbarch-selftests.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/gdbarch-selftests.c b/gdb/gdbarch-selftests.c
index 58ed11287a0..c748fcc6606 100644
--- a/gdb/gdbarch-selftests.c
+++ b/gdb/gdbarch-selftests.c
@@ -24,6 +24,7 @@
#include "inferior.h"
#include "gdbthread.h"
#include "target.h"
+#include "target-float.h"
namespace selftests {
@@ -178,11 +179,8 @@ register_to_value_test (struct gdbarch *gdbarch)
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- DOUBLEST d = 1.25;
-
/* Generate valid float format. */
- floatformat_from_doublest (floatformat_from_type (type),
- &d, expected.data ());
+ target_float_from_string (expected.data (), type, "1.25");
}
else
{