diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2014-09-04 10:28:31 -0400 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2014-09-04 10:30:01 -0400 |
commit | eb0b04635f2f57506ab4365b32a6fc0b62920d2f (patch) | |
tree | 3986b8aebc430e79b24014dee46cddd4558994bb /gdb/f-valprint.c | |
parent | 5ee44bfa6bdb8eaf7f30eccb4fbdc989cb9bb7ca (diff) | |
download | gdb-eb0b04635f2f57506ab4365b32a6fc0b62920d2f.zip gdb-eb0b04635f2f57506ab4365b32a6fc0b62920d2f.tar.gz gdb-eb0b04635f2f57506ab4365b32a6fc0b62920d2f.tar.bz2 |
Fix PR fortran/17237: bug in f-valprint.c
This commit fixes the PR mentioned in $subject. It is about a set but
unused variable that refers to the output format of integer values
printed in Fortran.
This was probably a thinko (like most set-but-unused-vars), but it
could cause an internal error depending on the scenario. I am sending
a testcase which triggers this error as well.
gdb/ChangeLog:
2014-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
PR fortran/17237
* f-valprint.c (f_val_print): Specify the correct print option to
use when printing integer values.
gdb/testsuite/ChangeLog:
2014-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
PR fortran/17237
* gdb.fortran/print-formatted.exp: New file.
* gdb.fortran/print-formatted.f90: Likewise.
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r-- | gdb/f-valprint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index c7581a8..9a43cf3 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -349,7 +349,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, opts.format = (options->format ? options->format : options->output_format); val_print_scalar_formatted (type, valaddr, embedded_offset, - original_value, options, 0, stream); + original_value, &opts, 0, stream); } else { |