[dmd-internals] [D-Programming-Language/dmd] 29eb97: more 64 bit ABI for structs

Walter Bright walter at digitalmars.com
Thu May 10 00:40:42 PDT 2012


Testing the fix now. Looking promising.

On 5/9/2012 8:06 PM, Jonathan M Davis wrote:
> druntime is also seeing a failure in core.time, which I can reproduce with 
> this: struct S { this(long length) { this.length = length; } long length; } 
> const(S) copy(const S s) { return s; } void main() { S t = S(42); const S u = 
> t; assert(t == u); assert(copy(t) == u); assert(t == copy(u)); } If I make 
> copy's parameter mutable, it passes. If I change the return type to mutable, 
> it still fails. So, it seems to be something related to copy's parameter being 
> const. However, the problem also goes away if S's constructor is removed, 
> which doesn't appear to have anything to do with const. I have no idea if this 
> relates to the problem in std.datetime or not, but it _is_ a problem only on 
> 64-bit, so it might be related. - Jonathan M Davis 
> _______________________________________________ dmd-internals mailing list 
> dmd-internals at puremagic.com 
> http://lists.puremagic.com/mailman/listinfo/dmd-internals 


More information about the dmd-internals mailing list