diff --git a/dvm/fdvm/trunk/fdvm/acc_f2c.cpp b/dvm/fdvm/trunk/fdvm/acc_f2c.cpp index 140c86a..07cb93a 100644 --- a/dvm/fdvm/trunk/fdvm/acc_f2c.cpp +++ b/dvm/fdvm/trunk/fdvm/acc_f2c.cpp @@ -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)); + } } } }