[Issue 5239] New: optimizer misreports an used before set error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 18 22:35:36 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5239
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
AssignedTo: nobody at puremagic.com
ReportedBy: braddr at puremagic.com
--- Comment #0 from Brad Roberts <braddr at puremagic.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list