Hi,

On 25.01.22 12:44, Jakub Jelinek via Fortran wrote:
Apparently something we (at least I) have totally missed, we clearly have a
problem with the IEEE modules for the dual -mabi={ibm,ieee}longdouble.
We have:
     __ieee_arithmetic_MOD_ieee_class_16;
     __ieee_arithmetic_MOD_ieee_support_datatype_16;
... exported from the library, but no corresponding _17 entrypoints.
Can everything these modules do be resolved at compile time inline
such that for the abi_kind 17 nothing is really called, or
any other thoughts on this?

We already have in gfc_conv_function_expr:

  /* The IEEE_ARITHMETIC functions are caught here. */
  if (sym->from_intmod == INTMOD_IEEE_ARITHMETIC)
    if (gfc_conv_ieee_arithmetic_function (se, expr))
      return;

which handles:
  if (startswith (name, "_gfortran_ieee_is_nan"))
  else if (startswith (name, "_gfortran_ieee_is_finite"))
  else if (startswith (name, "_gfortran_ieee_unordered"))
  else if (startswith (name, "_gfortran_ieee_is_normal"))
  else if (startswith (name, "_gfortran_ieee_is_negative"))
  else if (startswith (name, "_gfortran_ieee_copy_sign"))
  else if (startswith (name, "_gfortran_ieee_scalb"))
  else if (startswith (name, "_gfortran_ieee_next_after"))
  else if (startswith (name, "_gfortran_ieee_rem"))
  else if (startswith (name, "_gfortran_ieee_logb"))
  else if (startswith (name, "_gfortran_ieee_rint"))
else -> 'return false;' -> library call.

Thus, more functions could be handled in the compiler itself.
(Likewise for INTMOD_IEEE_EXCEPTIONS, not that I know whether
that has any relevant functions.)

Alternatively, kind= tweaking could be done here as well.

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
München, HRB 106955

Reply via email to