Comment #4 by moonlightsentinel — 2020-09-08T20:27:38Z
The test still fails on current master (e6a018e22e3040ef0051ab8fe42dc15e1df92019).
Slightly modified test without Phobos and manual output verification:
=========================================================
import core.math : sin;
class ObjHolder
{
Quaternion rotation;
Object[int] objs;
}
struct Quaternion
{
float x, y, z, w;
static Quaternion fromEulerAngles()
{
Quaternion q;
float sr = sin(1.0f);
q.w = sr;
q.x = sr;
q.y = sr;
return q;
}
}
ObjHolder create()
{
ObjHolder oh = new ObjHolder;
Object o = new Object;
oh.objs[0] = o;
oh.rotation = Quaternion.fromEulerAngles();
return oh;
}
void main()
{
ObjHolder oh = create();
if (!oh.objs[0]) assert(false);
}
===========================================================
> .\generated\windows\debug\64\dmd.exe -m64 -O -release -inline app.d
> .\app.exe
> echo $LASTEXITCODE
-1073741795
Comment #5 by dlang-bot — 2020-11-10T09:20:45Z
@WalterBright created dlang/dmd pull request #11944 "fix Issue 19662 - x86_64: Different code output when compiling with i…" fixing this issue:
- fix Issue 19662 - x86_64: Different code output when compiling with inline/boundscheck on/off
https://github.com/dlang/dmd/pull/11944
Comment #6 by dlang-bot — 2022-07-18T09:00:21Z
dlang/dmd pull request #11944 "fix Issue 19662 - x86_64: Different code output when compiling with i…" was merged into master:
- 45a3c0122a870f432d6818afb39aec2004204f7d by Walter Bright:
fix Issue 19662 - x86_64: Different code output when compiling with inline/boundscheck on/off
https://github.com/dlang/dmd/pull/11944
Comment #7 by ibuclaw — 2022-09-05T19:17:16Z
Not fixed. Test wasn't being ran in the closing PR.
Comment #8 by dlang-bot — 2022-09-05T19:19:35Z
@ibuclaw created dlang/dmd pull request #14419 "Revert "fix Issue 19662 - x86_64: Different code output when compiling with i…"" mentioning this issue:
- Revert "fix Issue 19662 - x86_64: Different code output when compiling with inline/boundscheck on/off (#11944)"
This reverts commit ff4007610173a2cea724b73bc6c1feb44069b435.
https://github.com/dlang/dmd/pull/14419
Comment #9 by skocznymr — 2022-11-01T20:56:15Z
Any idea why it works on run.dlang.io even when adding same compiler switches?
Comment #10 by robert.schadek — 2024-12-13T19:02:21Z