Skip to content

Commit

Permalink
Merge pull request #8078 from WalterBright/fix16107
Browse files Browse the repository at this point in the history
fix Issue 16107 - [ICE] - Internal error: backend/cgcod.c 2297
  • Loading branch information
WalterBright authored Mar 25, 2018
2 parents 74226cf + 6c42ce0 commit 7d79100
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dmd/backend/cgcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ STATIC void ecom(elem **pe)
ecom(&e->E2);
return;
case OPcomma:
ecom(&e->E1);
ecom(&e->E2);
return;

case OPremquo:
ecom(&e->E1);
ecom(&e->E2);
Expand Down
14 changes: 14 additions & 0 deletions test/compilable/test16107.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// https://issues.dlang.org/show_bug.cgi?id=16107

bool check()
{
bool result = false;

result |= false;
if (result) goto ret;

result |= false;
if (result) {}

ret: return true;
}

0 comments on commit 7d79100

Please sign in to comment.