From: MaartenBrock Date: Mon, 29 Oct 2007 15:47:22 +0000 (+0000) Subject: * src/SDCCpeeph.c (notVolatileVariable): extra check, somehow for hc08 an operand X-Git-Url: https://git.gag.com/?a=commitdiff_plain;ds=sidebyside;h=1e40748d55945b89eef6825943a29a31a05bb1f4;p=fw%2Fsdcc * src/SDCCpeeph.c (notVolatileVariable): extra check, somehow for hc08 an operand can have isspilt==1 and spillLoc==NULL (?) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4949 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCpeeph.c b/src/SDCCpeeph.c index 0359d894..871ca676 100644 --- a/src/SDCCpeeph.c +++ b/src/SDCCpeeph.c @@ -821,7 +821,9 @@ notVolatileVariable(char *var, lineNode *currPl, lineNode *endPl) op = IC_COND (cl->ic); if (IS_SYMOP (op) && ( !strcmp(OP_SYMBOL (op)->rname, symname) || - (OP_SYMBOL (op)->isspilt && !strcmp(SPIL_LOC (op)->rname, symname)) )) + (OP_SYMBOL (op)->isspilt && + SPIL_LOC (op) && + !strcmp(SPIL_LOC (op)->rname, symname)) )) { return !op->isvolatile; } @@ -829,7 +831,9 @@ notVolatileVariable(char *var, lineNode *currPl, lineNode *endPl) op = IC_JTCOND (cl->ic); if (IS_SYMOP (op) && ( !strcmp(OP_SYMBOL (op)->rname, symname) || - (OP_SYMBOL (op)->isspilt && !strcmp(SPIL_LOC (op)->rname, symname)) )) + (OP_SYMBOL (op)->isspilt && + SPIL_LOC (op) && + !strcmp(SPIL_LOC (op)->rname, symname)) )) { return !op->isvolatile; } @@ -837,21 +841,27 @@ notVolatileVariable(char *var, lineNode *currPl, lineNode *endPl) op = IC_LEFT (cl->ic); if (IS_SYMOP (op) && ( !strcmp(OP_SYMBOL (op)->rname, symname) || - (OP_SYMBOL (op)->isspilt && !strcmp(SPIL_LOC (op)->rname, symname)) )) + (OP_SYMBOL (op)->isspilt && + SPIL_LOC (op) && + !strcmp(SPIL_LOC (op)->rname, symname)) )) { return !op->isvolatile; } op = IC_RIGHT (cl->ic); if (IS_SYMOP (op) && ( !strcmp(OP_SYMBOL (op)->rname, symname) || - (OP_SYMBOL (op)->isspilt && !strcmp(SPIL_LOC (op)->rname, symname)) )) + (OP_SYMBOL (op)->isspilt && + SPIL_LOC (op) && + !strcmp(SPIL_LOC (op)->rname, symname)) )) { return !op->isvolatile; } op = IC_RESULT (cl->ic); if (IS_SYMOP (op) && ( !strcmp(OP_SYMBOL (op)->rname, symname) || - (OP_SYMBOL (op)->isspilt && !strcmp(SPIL_LOC (op)->rname, symname)) )) + (OP_SYMBOL (op)->isspilt && + SPIL_LOC (op) && + !strcmp(SPIL_LOC (op)->rname, symname)) )) { return !op->isvolatile; }