https://issues.dlang.org/show_bug.cgi?id=15490
Issue ID: 15490 Summary: Error variable __nrvoretval cannot be modified at compile time when using -inline Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: ibuc...@gdcproject.org Code: --- void main() { import std.regex; Regex!(char) pattern; pattern = regex(""); import vibe.core.net; void metricReceiver(TCPConnection) { } listenTCP(1, conn => metricReceiver(conn), "2"); } --- Command line (sorry haven't reduced beyond own project): --- dmd -c -inline -version=VibeUseNativeDriverType -version=VibeLibasyncDriver -I../../../.dub/packages/vibe-d-0.7.26/source/ -I../../../.dub/packages/libasync-0.7.5/source/ -I../../../.dub/packages/memutils-0.4.3/source/ --- Output: --- Using Linux EPOLL for events Error: variable __nrvoretval4587 cannot be modified at compile time /usr/include/dmd/phobos/std/regex/package.d(333): called from here: regex("^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4}$", "") /usr/include/dmd/phobos/std/regex/package.d(355): Error: template instance std.regex.ctRegexImpl!("^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4}$", "") error instantiating ../../../.dub/packages/vibe-d-0.7.26/source/vibe/core/drivers/libasync.d(197): instantiated from here: ctRegex!("^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4}$", "") Error: variable __nrvoretval4587 cannot be modified at compile time /usr/include/dmd/phobos/std/regex/package.d(333): called from here: regex("^([0-9A-Fa-f]{0,4}:){2,7}([0-9A-Fa-f]{1,4}$|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4})$", "") /usr/include/dmd/phobos/std/regex/package.d(355): Error: template instance std.regex.ctRegexImpl!("^([0-9A-Fa-f]{0,4}:){2,7}([0-9A-Fa-f]{1,4}$|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4})$", "") error instantiating ../../../.dub/packages/vibe-d-0.7.26/source/vibe/core/drivers/libasync.d(198): instantiated from here: ctRegex!("^([0-9A-Fa-f]{0,4}:){2,7}([0-9A-Fa-f]{1,4}$|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4})$", "") --- Workaround: --- Remove -inline flag --- --