[Issue 5976] "variable used before set" with foreach with ref + scope(failure) + structure method + -O -inline

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 11 08:32:10 PDT 2011


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



--- Comment #2 from Don <clugdbug at yahoo.com.au> 2011-05-11 08:28:11 PDT ---
Reduced test case that doesn't require structs or -inline.
Compile with -O.

void bug5976()
{
    int[] barr;
    int * k;
    foreach (ref b; barr)
    {
        scope(failure)
            k = &b;
        k = &b;
    }
}

-- 
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