Bug 6502 – failing with -release -inline -noboundscheck

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-08-15T21:10:00Z
Last change time
2011-10-18T10:18:19Z
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2011-08-15T21:10:03Z
The following program fails when compiled with -release -inline -noboundscheck ------------- import std.process; void main() { } --------------- with the message: \cbx\mars\druntime\import\core\time.di(253): Error: template core.time.TickDuration.to(string units, T) if ((units == "seconds" || units == "msecs" || units == "usecs" || units == "hnsecs" || units == "nsecs") && (__traits(isIntegral,T) && T.sizeof >= 4)) does not match any function template declarat ion \cbx\mars\druntime\import\core\time.di(253): Error: template core.time.TickDuration.to(string units, T) if ((units == "seconds" || units == "msecs" || units == "usecs" || units == "hnsecs" || units == "nsecs") && (__traits(isIntegral,T) && T.sizeof >= 4)) cannot deduce template function from argument types !("seconds",long)() It is unclear if it is a druntime problem or a dmd bug.
Comment #1 by issues.dlang — 2011-08-15T21:20:15Z
There may very well be a druntime bug here, but I fail to see how something compiling with one set of flags and failing to compile with another could be anything other than a compiler bug (save for flags such as version which affect conditional compilation).
Comment #2 by peter.alexander.au — 2011-09-15T03:01:43Z
*** Issue 6671 has been marked as a duplicate of this issue. ***
Comment #3 by r.sagitario — 2011-10-02T03:02:57Z
bug 6488 seems very much the same issue. Please see my recent comment there. Summary: boils down to di file generation converting function templates to eponymous templates, that have problems matching template arguments when qualifiers are involved.
Comment #4 by issues.dlang — 2011-10-18T08:14:08Z
*** Issue 6824 has been marked as a duplicate of this issue. ***
Comment #5 by bugzilla — 2011-10-18T10:18:19Z
*** This issue has been marked as a duplicate of issue 6488 ***