diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2015-12-15 03:16:26 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2015-12-15 03:16:26 +0000 |
commit | 8d3586e4e2426a2ae77c082134be67fe036c87a7 (patch) | |
tree | c83931793147529d54140fc2dafed0063dd1a22a /libgfortran | |
parent | 060eb4c9a45d624ef1e4b945ff6ec5d4bef69187 (diff) | |
download | gcc-8d3586e4e2426a2ae77c082134be67fe036c87a7.zip gcc-8d3586e4e2426a2ae77c082134be67fe036c87a7.tar.gz gcc-8d3586e4e2426a2ae77c082134be67fe036c87a7.tar.bz2 |
PR libfortran/pr68867
2015-12-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/pr68867
* io/write.c (set_fnode_default): For kind=16, set the decimal precision
depending on the platform binary precision, 106 or 113.
From-SVN: r231639
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/write.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index b8c698e..2aca878 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2015-12-14 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libfortran/pr68867 + * io/write.c (set_fnode_default): For kind=16, set the decimal precision + depending on the platform binary precision, 106 or 113. + 2015-12-05 Juoko Orava <jouko.orava@iki.fi> PR fortran/50201 diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 6656c97..f72b482 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -1405,9 +1405,16 @@ set_fnode_default (st_parameter_dt *dtp, fnode *f, int length) f->u.real.e = 4; break; case 16: + /* Adjust decimal precision depending on binary precision, 106 or 113. */ +#if GFC_REAL_16_DIGITS == 113 f->u.real.w = 45; f->u.real.d = 36; f->u.real.e = 4; +#else + f->u.real.w = 41; + f->u.real.d = 32; + f->u.real.e = 4; +#endif break; default: internal_error (&dtp->common, "bad real kind"); |