Thanks for looking into this, Shin. For now I commented out that unittest.
My epic saga of getting things to build hasn't ended. In fact my initial
goal was just to build the html, but that uses wine, which in turn has a
problem. Try this:
make -f linux.mak OS=win32wine debug
to see the following error messages:
std\math.d(1611): Error: sqrt cannot be interpreted at compile time,
because it has no available source code
std\math.d(1611): Error: sqrt cannot be interpreted at compile time,
because it has no available source code
std\math.d(1611): Error: sqrt cannot be interpreted at compile time,
because it has no available source code
std\math.d(1611): Error: sqrt cannot be interpreted at compile time,
because it has no available source code
std\math.d(1611): Error: sqrt cannot be interpreted at compile time,
because it has no available source code
std\math.d(1611): Error: sqrt cannot be interpreted at compile time,
because it has no available source code
std\math.d(1614): Error: static assert (2L * (1L / (0.5L *
sqrt(0x1p-16382L)) / 2L) * (1L / (0.5L * sqrt(0x1p-16382L)) / 2L) <=
0x1.fffffffffffffffep+16383L) is not evaluatable at compile time
It's great to have so many people contribute to Phobos, but I've never
had such a long streak of non-builds. It looks like new scale of
contribution asks for corresponding responsibility. Please, make sure
everything builds before checking in, and announce to this list if you
broke the build and are unable to fix it without help.
Andrei
On 05/25/2010 01:29 AM, Shin Fujishiro wrote:
Then std.functional segfaults :o/.
Reproduced! unittests for toDelegate() segfault with -O.
obj2asm showed that everything in toDelegate() was optimized away if
compiled with the -O option. Then an uninitialized delegate object was
returned.
Workaround:
--------------------
--- phobos/std/functional.d
+++ phobos/std/functional.d
@@ -590,7 +590,8 @@ auto ref toDelegate(F)(auto ref F fp) if
(isCallable!(F)) { auto dummyDel =&(dummy.doIt);
df.funcPtr = dummyDel.funcptr;
- return df.del;
+ auto del = df.del;
+ return del;
}
}
--------------------
toDelegate() is an auto ref function. A compiler bug allows the local
variable df.del to be returned by reference. I'm not very sure, but it
leads toDelegate() to return (reference to) uninitialized value.
I filed the bug into bugzilla:
http://d.puremagic.com/issues/show_bug.cgi?id=4232
Shin
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos