------- Comment #5 from rguenther at suse dot de  2008-06-23 09:48 -------
Subject: Re:  [4.4 Regression]: gfortran.dg/default_format_1.f90,
 22_locale/num_get/get/char/2.cc

On Mon, 23 Jun 2008, hp at gcc dot gnu dot org wrote:

> ------- 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.

Note that this type-punning using a union is ok, so it must be something
else (or it is gccs fault in this case).

Richard.


-- 


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

Reply via email to