LDC 0.11.0 Beta 3
bearophile
bearophileHUGS at lycos.com
Fri Jun 7 06:34:18 PDT 2013
I am compiling some of my code with ldc2 on Windows, and I have
found this, reduced:
import core.stdc.stdio: printf;
struct Foo {
double[2] a;
}
auto foos = [Foo([0.0, 0.0]), Foo([10.0, 20.0])];
void main() {
auto b1 = foos[0];
auto b2 = foos[1];
double[2] d = 0;
d[] = b1.a[] - b2.a[];
printf("%0.9f %0.9f\n", d[0], d[1]);
}
...>ldmd2 -run test.d
0.000000000 0.000000000
...>dmd -run test.d
-10.000000000 -20.000000000
I have found another bug that is less easy to reduce...
Bye,
bearophile
More information about the digitalmars-d-ldc
mailing list