[Bug 115] Union literals as rvalues yields different values every run

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Sun Apr 6 03:18:03 PDT 2014


http://bugzilla.gdcproject.org/show_bug.cgi?id=115

Johannes Pfau <johannespfau at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johannespfau at gmail.com

--- Comment #1 from Johannes Pfau <johannespfau at gmail.com> ---
The problem starts in the frontend, optimize.c(DotVarExp::optimize).
It optimizes 'func(_f(a).i)' into 'func (a)', so it produces a call to func
with an incorrectly typed parameter.

The backend then tries to pass 'a' in floating point register leading to these
strange results.

@Iain do you think this should be fixed in the frontend or in the glue layer by
doing an explicit conversion? I also wonder why the GCC backend didn't catch
this problem, I thought it should know there's a type mismatch between the
function declaration and the actual call?

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20140406/1bacb72f/attachment.html>


More information about the D.gnu mailing list