https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96983

--- Comment #10 from anlauf at gcc dot gnu.org ---
(In reply to r...@cebitec.uni-bielefeld.de from comment #9)
> >> 0x67606b build_round_expr
> >>         /vol/gcc/src/hg/master/local/gcc/fortran/trans-intrinsic.c:408
> >
> > That's:
> >
> >       arg = fold_convert (gfc_float128_type_node, arg);
> >
> > Can you find out what gfc_float128_type_node is on SPARC,

> 408         arg = fold_convert (gfc_float128_type_node, arg);
> (gdb) p gfc_float128_type_node
> $2 = <tree 0x0>

OK.  Can you print kind which was determined a few lines before?
Also, to find out why gfc_float128_type_node is NULL_TREE,
can you investigate the array gfc_real_kinds?

On x86, the supported kind values are 4,8,10,16, and

(gdb) p gfc_real_kinds[3]
$9 = {epsilon = {{_mpfr_prec = 113, _mpfr_sign = 1, _mpfr_exp = -111, 
      _mpfr_d = 0x27ee628}}, huge = {{_mpfr_prec = 113, _mpfr_sign = 1,
_mpfr_exp = 16384, 
      _mpfr_d = 0x27ee5e8}}, tiny = {{_mpfr_prec = 113, _mpfr_sign = 1, 
      _mpfr_exp = -16381, _mpfr_d = 0x27ee5c8}}, subnormal = {{_mpfr_prec =
113, 
      _mpfr_sign = 1, _mpfr_exp = -16493, _mpfr_d = 0x27ee608}}, kind = 16,
radix = 2, 
  digits = 113, min_exponent = -16381, max_exponent = 16384, range = 4931,
precision = 33, 
  mode_precision = 128, c_float = 0, c_double = 0, c_long_double = 0,
c_float128 = 1}

In trans-types.c we have:

      if (gfc_real_kinds[index].c_float128)
        gfc_float128_type_node = type;

Look in particular at the value of c_float128.

> I'd expect that's long double, which is IEEE128 on SPARC.

So if it is IEEE128, where does the difference from x86 come from?

Reply via email to