For atan (and other functions like it), calling __builtin_atan is sometimes supposed to fall back to the library version of atan. In the C++ front end, this interacts poorly with alternate asm names.
Consider the following test case: #ifdef __cplusplus extern "C" #endif double atan(double x) __asm("_fancy_atan"); double foo(double x) { return __builtin_atan(x); } When it's compiled as C, it gives the behavior I expect: foo calls _fancy_atan. The C++ front end, however, gets it wrong: we call _atan, ignoring the fact that this function is supposed to have a different assembler name. -- Summary: Alternate asm name for atan ignored when calling __builtin_atan Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: austern at apple dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-apple-darwin7.6.0 GCC host triplet: powerpc-apple-darwin7.6.0 GCC target triplet: powerpc-apple-darwin7.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19044