Jump to page: 1 2
Thread overview
[Issue 15490] [REG 2.067] Error variable __nrvoretval cannot be modified at compile time when using -inline
[Issue 15490] [REG 2.069Error variable __nrvoretval cannot be modified at compile time when using -inline
Dec 31, 2015
Iain Buclaw
[Issue 15490] [REG 2.069] Error variable __nrvoretval cannot be modified at compile time when using -inline
Dec 31, 2015
Iain Buclaw
Dec 31, 2015
Iain Buclaw
Dec 31, 2015
Iain Buclaw
Jan 01, 2016
ag0aep6g@gmail.com
Jan 03, 2016
Iain Buclaw
Jan 03, 2016
Iain Buclaw
Jan 03, 2016
Iain Buclaw
December 31, 2015
https://issues.dlang.org/show_bug.cgi?id=15490

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@gdcproject.org
            Summary|Error variable __nrvoretval |[REG 2.069Error variable
                   |cannot be modified at       |__nrvoretval cannot be
                   |compile time when using     |modified at compile time
                   |-inline                     |when using -inline

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[REG 2.069Error variable    |[REG 2.069] Error variable
                   |__nrvoretval cannot be      |__nrvoretval cannot be
                   |modified at compile time    |modified at compile time
                   |when using -inline          |when using -inline

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

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Doesn't happen if I switch from 2.069 to 2.068

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression

--
January 01, 2016
https://issues.dlang.org/show_bug.cgi?id=15490

ag0aep6g@gmail.com changed:

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

--- Comment #2 from ag0aep6g@gmail.com ---
Reduced:

main.d:
----
module main;

import imp1;
import imp2;

void main()
{
    regex();
    listenTCP();
}
----

imp1.d:
----
module imp1;

import imp2;

void listenTCP()
{
    enum r = regex();
}
----

imp2.d:
----
module imp2;

int regex()
{
    return regexImpl();
}

auto regexImpl()
{
    int r = 0;
    return r;
}
----

`dmd -c main.d` works. `dmd -c -inline main.d` gives:
----
Error: variable __nrvoretval51 cannot be modified at compile time
imp1.d(7):        called from here: regex()
----

This reduction fails with 2.068 and 2.067, too. But it compiles with 2.066.

--
January 03, 2016
https://issues.dlang.org/show_bug.cgi?id=15490

--- Comment #3 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to ag0aep6g from comment #2)
> Reduced:
> 
> This reduction fails with 2.068 and 2.067, too. But it compiles with 2.066.

Thanks alot!

Yes, I have been seeing the error occur in 2.068 too after splitting components of the project into packages.

I have an idea what was the bad commit, will give it a bisect.

--
January 03, 2016
https://issues.dlang.org/show_bug.cgi?id=15490

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[REG 2.069] Error variable  |[REG 2.067] Error variable
                   |__nrvoretval cannot be      |__nrvoretval cannot be
                   |modified at compile time    |modified at compile time
                   |when using -inline          |when using -inline

--
January 03, 2016
https://issues.dlang.org/show_bug.cgi?id=15490

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> ---
First bad commit: https://github.com/D-Programming-Language/dmd/pull/4353

--
February 07, 2016
https://issues.dlang.org/show_bug.cgi?id=15490

--- Comment #5 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/b56fa1d1b02c93151f0a25d868f4459cac8d6a4d
fix Issue 15490 - Error variable __nrvoretval cannot be modified at compile
time when using -inline

CTFE interpretr can recognize a form `CommaExp(DeclaraationExp(v), VarExp(v))`
as
a CTFEable variable declaration when `v._init` is `null`. In other cases, for
examle a sole `DeclarationExp` should have v._init for CTFE-ability.

Supply `VoidInitializer` to allow inlining the temporary for NRVO.

https://github.com/D-Programming-Language/dmd/commit/31232a9c64e799c439af5e3501b20cf9b7e7372b Merge pull request #5415 from 9rnsr/fix15490

[REG 2.067] Issue 15490 - Error variable __nrvoretval cannot be modified at compile time when using -inline

--
February 07, 2016
https://issues.dlang.org/show_bug.cgi?id=15490

github-bugzilla@puremagic.com changed:

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

--
« First   ‹ Prev
1 2