I've tried with DMD2.088 (which -fPIE was introduced) and got the same result. Perhaps it has been this way all along.
Comment #2 by dlang-bot — 2023-10-18T01:42:45Z
@kubo39 created dlang/dmd pull request #15705 "Fix Issue 24168 - Corrupted if TLS values are passed in ref parameters" fixing this issue:
- Fix Issue 24168 - Corrupted if TLS values are passed in ref parameters
when compiling with -fPIE
https://github.com/dlang/dmd/pull/15705
Comment #3 by dlang-bot — 2023-10-20T06:04:52Z
dlang/dmd pull request #15705 "Fix Issue 24168 - Corrupted if TLS values are passed in ref parameters" was merged into master:
- fe858d91b7df8a770765f78286395259cca0f697 by Hiroki Noda:
Fix Issue 24168 - Corrupted if TLS values are passed in ref parameters
when compiling with -fPIE
https://github.com/dlang/dmd/pull/15705