------- Comment #3 from hp at gcc dot gnu dot org  2008-06-23 07:12 -------
An obvious and plausible explanation.  It appears it's also correct; simulator
traces and trial link-time replacement gives it's _strtod_r (in
newlib/libc/stdlib/strtod.c) that's "miscompiled". On closer look it seems the
cause is the ugly type-punning done in the dword0 and dword1 macros (defined in
mprec.h in the same directory):

typedef union { double d; __ULong L[2]; } U;
#define dword0(x) ((U*)&x)->L[0]
#define dword1(x) ((U*)&x)->L[1]
with common use of dword0/1 as lvalues and mixing in non-cast assignments.
Ugh.


-- 

hp at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36593

Reply via email to