Thread overview
[Issue 6671] New: core.time compile error, only with -inline -release -noboundscheck
Sep 14, 2011
Peter Alexander
Sep 14, 2011
Dmitry Olshansky
Sep 15, 2011
Peter Alexander
September 14, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6671

           Summary: core.time compile error, only with -inline -release
                    -noboundscheck
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: peter.alexander.au@gmail.com


--- Comment #0 from Peter Alexander <peter.alexander.au@gmail.com> 2011-09-14 14:27:47 PDT ---
This is a bit of a weird one. In DMD 2.055 the following code:

import core.time;
void main() {}


Gives the compile error:

> dmd test.d -release -inline -noboundscheck
/Library/Compilers/dmd2/osx/bin/../../src/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 declaration
/Library/Compilers/dmd2/osx/bin/../../src/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 *only* happens with those three flags. Remove any one and the code compiles fine.

This didn't happen in DMD 2.053 (haven't tried 2.054)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 14, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6671


Dmitry Olshansky <dmitry.olsh@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh@gmail.com


--- Comment #1 from Dmitry Olshansky <dmitry.olsh@gmail.com> 2011-09-14 15:45:40 PDT ---
Looks like http://d.puremagic.com/issues/show_bug.cgi?id=6502 ?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 15, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6671


Peter Alexander <peter.alexander.au@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #2 from Peter Alexander <peter.alexander.au@gmail.com> 2011-09-15 03:01:42 PDT ---
(In reply to comment #1)
> Looks like http://d.puremagic.com/issues/show_bug.cgi?id=6502 ?

Yes, it looks like you're right. I'll close this one.

*** This issue has been marked as a duplicate of issue 6502 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------