http://d.puremagic.com/issues/show_bug.cgi?id=5564
Summary: [64-bit] loading of wrong constant byte value Product: D Version: D2 Platform: x86_64 OS/Version: FreeBSD Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2011-02-11 18:36:08 PST --- struct Temp { bool value; this(int, bool value) { this.value = value; } }; enum asserting = 255; //!<- anything below 256 will assert enum working = 256; //!<- anything above is fine void main() { assert(Temp(asserting, false).value == false); } --- In the constructor the bool is loaded from SIL which contains a non-zero value. I wonder why movregconst at cgen.c(610): if (r < 4 && ((regcon.immed.value[r] >> 8) & 0xFF) == value) { c = genregs(c,0x8A,reg,r | 4); // MOV regL,rH goto L2; } is generating a MOV dh, dh before calling the constructor. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------