fixed f2c

This commit is contained in:
ALEXks
2024-04-12 15:04:48 +03:00
parent 7a9794569f
commit 5b1e18cdfd

View File

@@ -1306,7 +1306,21 @@ static bool matchPrototype(SgSymbol *funcSymb, SgExpression *&listArgs, bool isF
}
}
else
argInCall->setLhs(SgAddrOp(*argInCall->lhs()));
{
SgExpression* arr = argInCall->lhs();
if (options.isOn(O_PL2))
{
SgType* cast = NULL;
if (typeInProtSave->hasBaseType())
cast = C_PointerType(C_Type(typeInProtSave->baseType()));
else
cast = C_PointerType(C_Type(typeInProtSave));
argInCall->setLhs(*new SgCastExp(*cast, SgAddrOp(*arr)));
}
else
argInCall->setLhs(SgAddrOp(*arr));
}
}
}
}