[Issue 15490] [REG 2.069] Error variable __nrvoretval cannot be modified at compile time when using -inline
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jan 1 05:23:31 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15490
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ag0aep6g at gmail.com
--- Comment #2 from ag0aep6g at 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.
--
More information about the Digitalmars-d-bugs
mailing list