Fix over eager const pointer forwarding
This commit is contained in:
parent
b428b608b5
commit
277afd156d
|
@ -239,6 +239,7 @@ void iec_talk(char dev, char sec)
|
|||
|
||||
iec_atn(dev | 0x40, sec | 0x60);
|
||||
clock_true();
|
||||
data_false();
|
||||
|
||||
delay(10);
|
||||
}
|
||||
|
|
|
@ -964,7 +964,9 @@ Expression* Expression::ConstantFold(Errors * errors, LinkerSection * dataSectio
|
|||
ex->mDecType = mLeft->mDecType;
|
||||
return ex;
|
||||
}
|
||||
else if (mType == EX_BINARY && mToken == TK_ADD && mLeft->mType == EX_VARIABLE && mLeft->mDecValue->mType == DT_VARIABLE && (mLeft->mDecValue->mFlags & DTF_CONST) && mLeft->mDecType->mType == DT_TYPE_POINTER && mRight->mType == EX_CONSTANT && mRight->mDecValue->mType == DT_CONST_INTEGER)
|
||||
else if (mType == EX_BINARY && mToken == TK_ADD && mLeft->mType == EX_VARIABLE && mLeft->mDecValue->mType == DT_VARIABLE && (mLeft->mDecValue->mFlags & DTF_CONST) &&
|
||||
mLeft->mDecValue->mValue->mType == EX_CONSTANT &&
|
||||
mLeft->mDecType->mType == DT_TYPE_POINTER && mRight->mType == EX_CONSTANT && mRight->mDecValue->mType == DT_CONST_INTEGER)
|
||||
{
|
||||
mLeft = mLeft->mDecValue->mValue;
|
||||
return this->ConstantFold(errors, dataSection);
|
||||
|
|
|
@ -21016,7 +21016,7 @@ void InterCodeProcedure::Close(void)
|
|||
{
|
||||
GrowingTypeArray tstack(IT_NONE);
|
||||
|
||||
CheckFunc = !strcmp(mIdent->mString, "main");
|
||||
CheckFunc = !strcmp(mIdent->mString, "__drawScreen__");
|
||||
CheckCase = false;
|
||||
|
||||
mEntryBlock = mBlocks[0];
|
||||
|
|
Loading…
Reference in New Issue