[Issue 16102] New: struct dtor replace value on stack
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Mon May 30 12:21:19 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=16102
          Issue ID: 16102
           Summary: struct dtor replace value on stack
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: code.viator at gmail.com
struct A { ~this() { } }
long[1] foo()
{
    A a;
    return [1];
}
void main()
{
    assert( foo() == [1] );
}
work for all static arrays with size == 8 bytes (int[2], float[2], ubyte[8],
etc)
only on debug mode assert fails
dmd --version
DMD64 D Compiler v2.071.0
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
--
    
    
More information about the Digitalmars-d-bugs
mailing list