[Issue 24884] backend generates wrong 32-bit code after inlining math with double[4]
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 26 12:33:24 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24884
--- Comment #1 from Dennis <dkorpel at live.nl> ---
Reduced a bit further:
```
pragma(inline, false)
bool norm(int a) => 0;
pragma(inline, false)
void inlinebug(ref double[4] point1, ref double[4] point2, ref double[4]
point3, ref double[4] abcd)
{
double[4] v1 = 0.0;
double[4] v2 = 0.0;
v1[0] = point1[0] - point2[0];
v1[1] = point1[1] - point2[1];
v1[2] = point1[2] - point2[2];
v1[3] = point1[3];
v2[0] = point2[0] - point3[0];
v2[1] = point2[1] - point3[1];
v2[2] = point2[2] - point3[2];
int p = cast(int) &abcd;
int q = cast(int) &point1;
abcd[0] = norm(p) + p;
abcd[1] = q + p;
}
void main()
{
double[4] a = 0.0;
inlinebug(a, a, a, a);
}
```
--
More information about the Digitalmars-d-bugs
mailing list