digitalmars.D - Help needed: DMD corrupts parameters that are small float
- Dennis (20/20) Dec 13 2021 Small static arrays and structs are passed to a function in
Small static arrays and structs are passed to a function in registers, but when they have float members and the function body has a nested function inside it (creating a closure), DMD reads the floats wrong. This is a regression introduced by the big Posix ABI fixes PR: https://github.com/dlang/dmd/pull/10200 I encountered this while writing new code and filed this on bugzilla: [Issue 22163 - wrong code with static float array and delegate accessing it](https://issues.dlang.org/show_bug.cgi?id=22163) Here someone encountered this when upgrading dmd: [Issue 22588 - Array corruption with std.conv.to](https://issues.dlang.org/show_bug.cgi?id=22588) This is really bad. Here's my attempt to fix it: https://github.com/dlang/dmd/pull/13256 But I could really use a review from someone familiar with the Posix ABI/volatile parameters. Also, the new test case for it fails on Windows, but I don't have a working dmd development environment set up on Windows yet, so it will take me some time to find the cause of that.
Dec 13 2021