http://d.puremagic.com/issues/show_bug.cgi?id=9539

           Summary: Regression (2.061): Wrong-code on static array pointer
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2013-02-19 
14:13:47 PST ---
void f(int** ptr)
{
    assert(**ptr == 10);
}

void main()
{
    int* i = new int;
    *i = 10;
    int*[1] x = [i];
    f(&x[0]);
}

2.060:
$ dmd test.d
> 

2.061
$ dmd test.d
> core.exception.AssertError@test(5): Assertion failure

2.062
$ dmd test.d
> core.exception.AssertError@test(5): Assertion failure

Same thing happens when you use 'x.ptr'.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to