The following weird result happens only with -m64 enabled. To reproduce the bug from this test case, -inline must be disabled to prevent the two functions from being inlined, though in the more complex cases that I reduced it from inlining could be enabled. import std.stdio; float fun(float[] data, sizediff_t k) { stderr.writeln("Returning ", data[k]); // Prints "Returning 2" return data[k]; } double gun(float[] data) { return fun(data, data.length / 2); } void main() { float[] test = [1,4,2,3,5]; stderr.writeln(gun(test)); // Prints 5.30499e-215 }
https://github.com/D-Programming-Language/dmd/commit/e5b63251d2c0fb4d2aa7929d3560e0f4d42be458 https://github.com/D-Programming-Language/dmd/commit/bc29f3797e695fe7ff3ad5da5f3c5bc6e43a84da
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル