public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19044] New: Alternate asm name for atan ignored when calling __builtin_atan
@ 2004-12-16 21:15 austern at apple dot com
  2004-12-16 23:35 ` [Bug c++/19044] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: austern at apple dot com @ 2004-12-16 21:15 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-12-20 20:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-16 21:15 [Bug c++/19044] New: Alternate asm name for atan ignored when calling __builtin_atan austern at apple dot com
2004-12-16 23:35 ` [Bug c++/19044] " pinskia at gcc dot gnu dot org
2004-12-18  1:17 ` austern at apple dot com
2004-12-18 18:35 ` pinskia at gcc dot gnu dot org
2004-12-20 20:12 ` cvs-commit at gcc dot gnu dot org
2004-12-20 20:40 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).