#include <time.h>
#include "gfortran.h"
+#include "arith.h"
#include "match.h"
#include "parse.h" /* FIXME */
tail->next = new;
tail = new;
- /* See what kind of interface we're dealing with. Asusume it is
+ /* See what kind of interface we're dealing with. Assume it is
not an operator. */
new->operator = INTRINSIC_NONE;
if (gfc_match_generic_spec (&type, name, &operator) == MATCH_ERROR)
static void
-mio_gmp_real (mpf_t * real)
+mio_gmp_real (mpfr_t * real)
{
mp_exp_t exponent;
char *p;
if (parse_atom () != ATOM_STRING)
bad_module ("Expected real string");
- mpf_init (*real);
- mpf_set_str (*real, atom_string, -16);
+ mpfr_init (*real);
+ mpfr_set_str (*real, atom_string, 16, GFC_RND_MODE);
gfc_free (atom_string);
}
else
{
- p = mpf_get_str (NULL, &exponent, 16, 0, *real);
+ p = mpfr_get_str (NULL, &exponent, 16, 0, *real, GFC_RND_MODE);
atom_string = gfc_getmem (strlen (p) + 20);
sprintf (atom_string, "0.%s@%ld", p, exponent);
break;
case BT_REAL:
+ gfc_set_model_kind (e->ts.kind);
mio_gmp_real (&e->value.real);
break;
case BT_COMPLEX:
+ gfc_set_model_kind (e->ts.kind);
mio_gmp_real (&e->value.complex.r);
mio_gmp_real (&e->value.complex.i);
break;