Control assert with _DEBUG to avoid gcc core dump

This commit is contained in:
drmortalwombat 2024-01-23 16:53:30 +01:00
parent 529618ffa4
commit 2c1a87ce02
2 changed files with 3 additions and 1 deletions

View File

@ -4995,6 +4995,7 @@ InterCodeBasicBlock* InterCodeBasicBlock::Clone(void)
void InterCodeBasicBlock::Append(InterInstruction * code)
{
#if _DEBUG
if (code->mCode == IC_BINARY_OPERATOR)
{
assert(code->mSrc[1].mType != IT_POINTER);
@ -5018,6 +5019,7 @@ void InterCodeBasicBlock::Append(InterInstruction * code)
assert(code->mSrc[i].mType != IT_NONE);
assert(!(code->mInUse));
#endif
code->mInUse = true;
this->mInstructions.Push(code);
}

View File

@ -1467,7 +1467,7 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateInline(Declaration* pro
wins->mSrc[1].mMemory = IM_INDIRECT;
wins->mSrc[0].mType = vr.mReference > 0 ? IT_POINTER : InterTypeOf(vr.mType);
wins->mSrc[0].mTemp = vr.mTemp;
assert(wins->mSrc[0].mType != IT_NONE);
// assert(wins->mSrc[0].mType != IT_NONE);
wins->mSrc[1].mType = IT_POINTER;
wins->mSrc[1].mTemp = ains->mDst.mTemp;
if (pdec)