Thread overview
[Issue 15251] [REG2.069.0-rc1] std.datetime bug with -inline
[Issue 15251] std.datetime bug with -inline
Oct 27, 2015
Vladimir Panteleev
Oct 27, 2015
Vladimir Panteleev
Oct 27, 2015
Martin Nowak
Oct 27, 2015
Vladimir Panteleev
Oct 27, 2015
Martin Nowak
Oct 28, 2015
Kenji Hara
Oct 30, 2015
Martin Nowak
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |thecybershadow@gmail.com

--- Comment #1 from Vladimir Panteleev <thecybershadow@gmail.com> ---
https://github.com/D-Programming-Language/phobos/pull/3776

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|pull                        |

--- Comment #2 from Vladimir Panteleev <thecybershadow@gmail.com> ---
Sorry, wrong window

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@dawg.eu

--- Comment #3 from Martin Nowak <code@dawg.eu> ---
cat > a.d << CODE
import std.net.curl;
CODE

cat > b.d << CODE
import std.datetime;

string J(Date L)
{
    return L.toISOExtString;
}
CODE
dmd -inline -o- a.d b.d

----
Error: cannot cast cast(ubyte)20u to void at compile time
/usr/include/dmd/phobos/std/conv.d(1259):        called from here:
array(toChars(value + 0LU))
/usr/include/dmd/phobos/std/conv.d(861):        called from here: toImpl(value,
10u, cast(LetterCase)false)
/usr/include/dmd/phobos/std/format.d(3490):        called from here: to(n)
/usr/include/dmd/phobos/std/format.d(3501):        called from here: gencode()
/usr/include/dmd/phobos/std/format.d(3501): Error: argument to mixin must be a
string, not (gencode()) of type string
/usr/include/dmd/phobos/std/format.d(545): Error: template instance
std.format.formatNth!(Appender!string, char, const(short), const(Month),
const(ubyte)) error instantiating
----

Confirmed, currently reducing.

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|std.datetime bug with       |[REG2.069.0-rc1]
                   |-inline                     |std.datetime bug with
                   |                            |-inline
           Severity|enhancement                 |regression

--- Comment #4 from Vladimir Panteleev <thecybershadow@gmail.com> ---
Introduced in https://github.com/D-Programming-Language/dmd/pull/5216

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

--- Comment #5 from Martin Nowak <code@dawg.eu> ---
(In reply to Martin Nowak from comment #3)
> Confirmed, currently reducing.

Not much better.
cat > bug.d << CODE
import std.concurrency;

void receiveAsyncChunks(Tid fromTid)
{
    fromTid.send(thisTid);
}
CODE

--
October 28, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE, pull
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #6 from Kenji Hara <k.hara.pg@gmail.com> ---
https://github.com/D-Programming-Language/dmd/pull/5235

--
October 28, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5ea992ff02f216438341f17835560d3d818124be fix Issue 15251 - std.datetime bug with -inline

The problem is in CTFE interpreter.

Inlining had introduced `cast(void)` expression to `ForStatement.increment`
part,
then it had hit following interpret issues.

1. `CastExp.interpret` does not work for `cast(void)` if `goal` is not
`ctfeNeedNothing`.
2. `ForStatement.interpert` does not evaluate its `increment` part with
`ctfeNeedNothing`.

I fix both of them for the best work, although fixing one of them can fix the original issue,

https://github.com/D-Programming-Language/dmd/commit/1b21ea36893838e30e6b861b4e9000a276cad5d6 Merge pull request #5235 from 9rnsr/fix15251

[REG2.069.0-rc1] Issue 15251 - std.datetime bug with -inline

--
October 28, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

github-bugzilla@puremagic.com changed:

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

--
October 30, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |briancschott@gmail.com

--- Comment #8 from Martin Nowak <code@dawg.eu> ---
*** Issue 15252 has been marked as a duplicate of this issue. ***

--
October 31, 2015
https://issues.dlang.org/show_bug.cgi?id=15251

--- Comment #9 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5ea992ff02f216438341f17835560d3d818124be fix Issue 15251 - std.datetime bug with -inline

https://github.com/D-Programming-Language/dmd/commit/1b21ea36893838e30e6b861b4e9000a276cad5d6 Merge pull request #5235 from 9rnsr/fix15251

--