Skip to content

Commit

Permalink
fix Issue 16107 - [ICE] - Internal error: backend/cgcod.c 2297
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Mar 25, 2018
1 parent 7cb7a9d commit 6c42ce0
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
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
@@ -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 6c42ce0

Please sign in to comment.