Summary: optimizer misreports an used before set error
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Brad Roberts <> 2010-11-18 22:34:20 PST 
(an excerpt from runnable/interpret.d)

struct S { int x; }
template Compileable(int z) { bool OK=true;}

int goodfoo3()
   S[4] w = void; // uninitialized array of structs
   w[$-2].x = 217; // initialize one member
   return w[2].x; // line 8

$ dmd -c -O f.d
f.d(8): Error: variable w used before set

note: filed as d2, but might well exist on d1 as well.. untested

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to