[Bug fortran/48404] SELECTED_REAL_KIND is returning KIND=16 when not available

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 6 06:54:00 GMT 2011


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

--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-04-06 06:53:53 UTC ---
(In reply to comment #8)
> My gcc4.5 and gcc4.4 apparently did not have libquadmath-support

Yes, libquadmath is a new GCC 4.6 feature, cf.
http://gcc.gnu.org/gcc-4.6/changes.html and
http://gcc.gnu.org/onlinedocs/libquadmath/ -- While primarily added and used
for gfortran, it also can be used with C/C++. On GLIBC systems, libquadmath has
printf hooks, allowing one to use the __float128 directly in (s,sn,f,)printf.
(On other systems, quadmath_snprintf has to be used.)


> Not much can be done if the packages get it wrong. Thanks for the help. I'll
> close the bug report.

Thanks.

(In terms of compatibility of older programs with newer "libgfortan"s, it is
unfortunate. However, as the capabilities of the compiler are checked during
the compilation of the library, it is difficult to avoid. Fortunately, it only
affects SELECTED_REAL_KIND where the arguments are not known at compile time.
 -- The Fortran 2008 "workaround" is to use ISO_Fortran_env's REAL_KINDS, which
gfortran supports since GCC 4.6 - but F2008 only and GCC since 4.6 does not
make it really portable.)



More information about the Gcc-bugs mailing list