6c, 8c: Fix nocast cast bug which prevents address arithmetic from being computed at compile time

This commit is contained in:
spew 2018-05-28 19:38:33 -04:00
parent 6b22a732e8
commit 3d0ebdc439
2 changed files with 4 additions and 2 deletions

View file

@ -105,7 +105,8 @@ xcom(Node *n)
case OADD:
xcom(l);
xcom(r);
if(n->type->etype != TIND)
if(n->type->etype != TIND &&
!(l->type->etype == TIND && r->type->etype == TIND))
break;
switch(r->addable) {

View file

@ -112,7 +112,8 @@ xcom(Node *n)
case OADD:
xcom(l);
xcom(r);
if(n->type->etype != TIND)
if(n->type->etype != TIND &&
!(l->type->etype == TIND && r->type->etype == TIND))
break;
switch(r->addable) {