http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58020

--- Comment #17 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #16)
> I want to mention that there is now some additional support for IEEE in
> libgfortran/config.

Yes, I see that this has grown since I first introduced it (in 2005! it's a
while back). That's good, and we can use this (possibly modified) interface to
the hardware/OS-specific function calls.

Another issue I wanted to get your opinion on, Tobias: we can't implement the
IEEE modules fully on the library side, because of three things:

  1. Changes in behavior when the modules are loaded: I'm not sure I understand
the full extent of these changes. Comment #11 in PR29383 seems to imply that
there are no such changes.

  2. Some IEEE functions are allowed in constant or specification expressions,
thus requiring front-end cooperation: IEEE_SELECTED_REAL_KIND is allowed in
constant expressions; IEEE_SUPPORT_* functions are allowed in specification
expressions.

  3. Library-side implementation of some functions (IEEE_IS_NAN, to give only
one example) will require a function call, while emitting code from the
front-end (like we do for our own ISNAN) will not incur that penalty.

However, for the rest of it, library-side implementation is easier. So, do you
think we can implement the module in libgfortran, and add only minimal
front-end tweaking to "catch" the necessary cases?

Reply via email to