[Bug target/47032] libgfortran references complex long double functions missing on AIX

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Feb 12 15:08:00 GMT 2011


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #12 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-12 15:04:48 UTC ---
(In reply to comment #11)
> While this is absolutely true, the major problem here is that gcc should not
> have switched to 128bit long double at all with AIX 6.1 (bug#46481).

Cf. http://gcc.gnu.org/ml/gcc/2011-02/msg00109.html
and http://gcc.gnu.org/ml/gcc/2011-02/msg00159.html

 * * *

For the libgfortran side: Seems as if one should add a "#include
<math.h>"-based link test (cf. comment 8 and 10).

libgfortran currently only uses the functions if available (configure check).
The effect, if the are not, is the following:

(In reply to comment #0)
> ld: 0711-317 ERROR: Undefined symbol: .__copysignl128
> ld: 0711-317 ERROR: Undefined symbol: .__nextafterl128

Used by Fortran's NEAREST intrinsic (if available; no fall back if not) - thus,
it will fail if a user calls this function but should otherwise be OK.

> ld: 0711-317 ERROR: Undefined symbol: .__scalbnl128

Used for the intrinsics RRSPACING, SPACING and SET_EXPONENT.

> ld: 0711-317 ERROR: Undefined symbol: .__truncl128

Used for Fortran's ERFC_SCALED intrinsic.


> ld: 0711-317 ERROR: Undefined symbol: .__cabsl128
> ld: 0711-317 ERROR: Undefined symbol: .__cargl128

gfortran offers a replacement function in intrinsics/c99_functions.c, if
configure believes that those are not available.

I think most codes/users do not need either of NEAREST, ERFC_SCALED, RRSPACING,
SPACING and SET_EXPONENT. (I do not know whether other math functions are
effected, whose calls are directly generated via the front end.)



More information about the Gcc-bugs mailing list