[Issue 19662] x86_64: Different code output when compiling with inline/boundscheck on/off
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 8 22:43:41 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19662
--- Comment #1 from skocznymr at gmail.com ---
Further reduced version:
import std.stdio;
import std.math;
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;
}
}
void main()
{
ObjHolder oh = new ObjHolder;
Object o = new Object;
oh.objs[0] = o;
writeln(oh.objs[0]);
oh.rotation = Quaternion.fromEulerAngles();
}
good output should be "Object.Object"
bad output is "null"
--
More information about the Digitalmars-d-bugs
mailing list