[flang-commits] [flang] [flang] Adjust _FORTRAN_RUNTIME_IEEE_FENV_T_EXTENT for Solaris (PR #74590)

Rainer Orth via flang-commits flang-commits at lists.llvm.org
Thu Dec 14 02:19:23 PST 2023


rorth wrote:

> > Just removing the assertion fixes the Solaris build indeed: the testsuite results are identical to those with my patch.
> > How should we do this properly: just add a comment in `exceptions.cpp` or also add one in `magic-numbers.h` indicating that `_FORTRAN_RUNTIME_IEEE_FENV_T_EXTENT` is too small on Solaris?
> 
> There is already a comment at the end of `exceptions.cpp` for `femode_t` objects, which is very similar to this problem. My preference is to add/extend the comment there.

I've updated the patch accordingly.

> My original code for this was an assert in the compiler rather than the runtime. That nicely solves all existing issues. The problem is that we would eventually like to support cross compilation, where a front end assert doesn't work. One way to resolve this would be to allocate these objects dynamically at runtime, although that would penalize typical compilations. Eventually we might want to generate different code for local compilation vs. cross compilation.

Ah, understood.  Coming from GCC where the target is fixed at compiler build time, I keep forgetting that LLVM is different in this regard. 

> Bottom line - I'm still looking at this. For now I can live with something that allows builds to succeed.

The revised patch did just that: re-tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.

https://github.com/llvm/llvm-project/pull/74590


More information about the flang-commits mailing list