[Bug target/31161] __builtin_cexpi is broken on Darwin
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Mar 15 09:40:00 GMT 2007
------- Comment #6 from rguenth at gcc dot gnu dot org 2007-03-15 09:40 -------
Yes, I'll restore 4.2.0 behavior here. Though maybe falling back to a function
call to cexp would be more natural...
The Problem with Fortran and C++ is that they assume a C99 runtime and so they
effectively set TARGET_C99_FUNCTIONS and provide fallback implementations. For
example libgfortran contains
#if !defined(HAVE_CEXP)
#define HAVE_CEXP 1
double complex
cexp (double complex z)
{
double a, b;
double complex v;
a = REALPART (z);
b = IMAGPART (z);
COMPLEX_ASSIGN (v, cos (b), sin (b));
return exp (a) * v;
}
#endif
and C++ simply relies on the target cexp() functioning correctly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31161
More information about the Gcc-bugs
mailing list