[Bug 179] invalid code generation with -O2 for method returning ref
via D.gnu
d.gnu at puremagic.com
Sat Apr 18 13:11:39 PDT 2015
http://bugzilla.gdcproject.org/show_bug.cgi?id=179
--- Comment #7 from Iain Buclaw <ibuclaw at gdcproject.org> ---
There seems to be a key thing happening here:
---
struct SignalImpl
{
@disable this(this); // SignalImpl is now non-POD
}
---
Because of this, TypeFunction::toCtype sets TREE_ADDRESSABLE on functions
returning SignalImpl (which is correct behaviour, we do *not* want non-POD
types to return in registers).
However...
---
ref RestrictedSignal valueChanged()
{
return valueChangedSg.mRestricted; // returned by ref
}
---
Reference returns should not have TREE_ADDRESSABLE set as they are already
returning in memory.
--
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/20150418/624b2162/attachment.html>
More information about the D.gnu
mailing list