------- Comment #3 from rguenth at gcc dot gnu dot org 2008-08-29 13:11 ------- Actually, it looks like we treat
namespace std { inline double atanh(double __x) { return __builtin_atanh(__x); } } as a definition of ::atanh (with C linkage), and emit atanh: .LFB0: pushq %rbp .LCFI0: movq %rsp, %rbp .LCFI1: subq $32, %rsp .LCFI2: movsd %xmm0, -8(%rbp) movsd -8(%rbp), %xmm0 call atanh movsd %xmm0, -24(%rbp) movq -24(%rbp), %rax movq %rax, -24(%rbp) movsd -24(%rbp), %xmm0 leave ret main: .LFB1: pushq %rbp .LCFI3: movq %rsp, %rbp .LCFI4: movsd .LC0(%rip), %xmm0 call atanh movl $0, %eax leave ret So, this is a frontend bug. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu dot org AssignedTo|rguenth at gcc dot gnu dot |unassigned at gcc dot gnu |org |dot org Status|ASSIGNED |NEW Keywords| |wrong-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37276