Skip to content

Commit

Permalink
Merge pull request #6452 from WalterBright/fix17072
Browse files Browse the repository at this point in the history
fix Issue 17072 - [REG 2.073.0-b1] missing symbols with -inline
  • Loading branch information
MartinNowak committed Jan 17, 2017
2 parents f7dc4fd + 40ab3c0 commit 661be50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/escape.d
Expand Up @@ -532,15 +532,15 @@ private bool checkEscapeImpl(Scope* sc, Expression e, bool refs, bool gag)
/* Check for returning a ref variable by 'ref', but should be 'return ref'
* Infer the addition of 'return', or set result to be the offending expression.
*/
if (global.params.useDIP25 &&
(v.storage_class & (STCref | STCout)) &&
if ( (v.storage_class & (STCref | STCout)) &&
!(v.storage_class & (STCreturn | STCforeach)))
{
if (sc.func.flags & FUNCFLAGreturnInprocess && p == sc.func)
{
inferReturn(sc.func, v); // infer addition of 'return'
}
else if (sc._module && sc._module.isRoot())
else if (global.params.useDIP25 &&
sc._module && sc._module.isRoot())
{
// Only look for errors if in module listed on command line

Expand Down
13 changes: 13 additions & 0 deletions test/runnable/test17072.d
@@ -0,0 +1,13 @@
/*
REQUIRED_ARGS: -inline
PERMUTE_ARGS: -release -O -dip25
*/

// https://issues.dlang.org/show_bug.cgi?id=17072

import core.thread;

void main()
{
Thread.sleep(dur!"msecs"(0));
}

0 comments on commit 661be50

Please sign in to comment.