module dmd_crash; void main() { debug { import std.math; FloatingPointControl fpc; fpc.enableExceptions(FloatingPointControl.severeExceptions); } } > dmd -debug dmd_crash.d --------------------------- dmd.exe - Application Error --------------------------- The instruction at "0x00406be3" referenced memory at "0x00000030". The memory could not be "read". Click on OK to terminate the program Click on CANCEL to debug the program --------------------------- OK Cancel ---------------------------
Lowering to critical as I can use my own version statements to work around this: void main() { version (Debug) { import std.math; FloatingPointControl fpc; fpc.enableExceptions(FloatingPointControl.severeExceptions); } } > dmd -version=Debug dmd_crash.d This will work.
Fixed in 2.057, but again there's no reference to a pull request. :/