diff options
author | Francois-Xavier Coudert <fxcoudert@gmail.com> | 2021-12-22 12:46:07 +0100 |
---|---|---|
committer | Francois-Xavier Coudert <fxcoudert@gmail.com> | 2021-12-22 12:46:07 +0100 |
commit | 228173565eafbe34e44c1600c32e32a323eb5aab (patch) | |
tree | ff4d90bde8b993288a4d8f85ef0bbe866ad95b3e /gcc/config | |
parent | 63eb073efbe6dfbf682b687dda2940ab027b474d (diff) | |
download | gcc-228173565eafbe34e44c1600c32e32a323eb5aab.zip gcc-228173565eafbe34e44c1600c32e32a323eb5aab.tar.gz gcc-228173565eafbe34e44c1600c32e32a323eb5aab.tar.bz2 |
Fortran: allow __float128 on targets where long double is not REAL(KIND=10)
The logic for detection of REAL(KIND=16) in kinds-override.h made
assumptions:
-- if real(kind=10) exists, i.e. if HAVE_GFC_REAL_10 is defined,
then it is necessarily the "long double" type
-- if real(kind=16) exists, then:
* if HAVE_GFC_REAL_10, real(kind=16) is "__float128"
* otherwise, real(kind=16) is "long double"
This may not always be true. Take the aarch64-apple-darwin port,
it has double == long double == binary64, and __float128 == binary128.
We already have more fine-grained logic in the mk-kinds-h.sh script,
where we actually check the Fortran kind corresponding to C’s long
double. So let's use it, and emit the GFC_REAL_16_IS_FLOAT128 /
GFC_REAL_16_IS_LONG_DOUBLE macros there.
libgfortran/ChangeLog:
* kinds-override.h: Move GFC_REAL_16_IS_* macros...
* mk-kinds-h.sh: ... here.
Diffstat (limited to 'gcc/config')
0 files changed, 0 insertions, 0 deletions