diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2011-08-01 16:02:03 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2011-08-01 16:02:03 +0000 |
commit | fbe12357d4aaa2725add205fca71cbbc3cc82f9d (patch) | |
tree | 1de260706743f9cbebc22501868fed9fdf266858 /gdb/testsuite/gdb.base/float.c | |
parent | b1d288d35675434002cd5681b000a0e037989d36 (diff) | |
download | gdb-fbe12357d4aaa2725add205fca71cbbc3cc82f9d.zip gdb-fbe12357d4aaa2725add205fca71cbbc3cc82f9d.tar.gz gdb-fbe12357d4aaa2725add205fca71cbbc3cc82f9d.tar.bz2 |
2011-08-01 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/13045
* doublest.c (convert_doublest_to_floatformat): Pass correct
mantissa length to put_field.
testsuite/ChangeLog:
2011-07-30 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/13045
* gdb.base/float.exp: Add new test case for PR gdb/13045
* gdb.base/float.c: New file.
Diffstat (limited to 'gdb/testsuite/gdb.base/float.c')
-rw-r--r-- | gdb/testsuite/gdb.base/float.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/float.c b/gdb/testsuite/gdb.base/float.c new file mode 100644 index 0000000..052f1d7 --- /dev/null +++ b/gdb/testsuite/gdb.base/float.c @@ -0,0 +1,32 @@ +/* This test program is part of GDB, the GNU debugger. + + Copyright 2011 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/>. + */ + +float +foo () +{ + float x = 0.0; + x = 1.0 / x; + return x; +} + +int +main () +{ + foo (); + return 0; +} |