[Issue 18704] New: std/datetime/stopwatch.d(452) assertion failure on auto-tester
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 2 06:29:01 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18704
Issue ID: 18704
Summary: std/datetime/stopwatch.d(452) assertion failure on
auto-tester
Product: D
Version: D2
Hardware: x86
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: greensunny12 at gmail.com
I see the following failure on auto-tester:
---
****** FAIL debug32 std.datetime.stopwatch
core.exception.AssertError at std/datetime/stopwatch.d(452): unittest failure
----------------
gmake[1]: *** [posix.mak:380: unittest/std/datetime/stopwatch.run] Error 1
gmake[1]: *** Waiting for unfinished jobs....
---
https://auto-tester.puremagic.com/show-run.ghtml?projectid=1&runid=3102407&isPull=true
```
void f0() nothrow {}
void f1() nothrow { auto b = to!string(a); }
auto r = benchmark!(f0, f1)(1000);
assert(r[0] >= Duration.zero);
assert(r[1] > Duration.zero);
assert(r[1] > r[0]);
```
It looks like we need to disable optimization of f1.
--
More information about the Digitalmars-d-bugs
mailing list