[Issue 6882] New: Reference to rvalue segfaults

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 2 08:55:41 PDT 2011


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

           Summary: Reference to rvalue segfaults
           Product: D
           Version: unspecified
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: jens.k.mueller at gmx.de


--- Comment #0 from jens.k.mueller at gmx.de 2011-11-02 08:55:12 PDT ---
This code

unittest
{   
    void foo(ref string bar)
    {   
        bar = bar[1 .. $];
    }

    foo("test");
}

segfaults with dmd v2.056 on Linux.
In my understanding the problem is that "test" is an rvalue and dmd should
report an compile error. I have no complete understanding regarding lvalues vs.
rvalues in D.

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


More information about the Digitalmars-d-bugs mailing list