This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37276] Trouble with some (C99?) math builtins and namespace std
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Aug 2008 13:11:59 -0000
- Subject: [Bug c++/37276] Trouble with some (C99?) math builtins and namespace std
- References: <bug-37276-16141@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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