diff options
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index a81067c..af81c3a 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -2535,6 +2535,14 @@ mio_gmp_real (mpfr_t *real) else { p = mpfr_get_str (NULL, &exponent, 16, 0, *real, GFC_RND_MODE); + + if (mpfr_nan_p (*real) || mpfr_inf_p (*real)) + { + write_atom (ATOM_STRING, p); + gfc_free (p); + return; + } + atom_string = gfc_getmem (strlen (p) + 20); sprintf (atom_string, "0.%s@%ld", p, exponent); |