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.
https://github.com/D-Programming-Language/dmd/commit/95428dfeb286027541a60ca2afeeaecc673a48ec https://github.com/D-Programming-Language/dmd/commit/4325d7adca02853cd1eb94b6469db7d8e9d2fdcc
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル