Fixed generation of non optimal code in StructRef()

git-svn-id: svn://svn.cc65.org/cc65/trunk@3071 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2004-06-03 11:10:30 +00:00
parent 763a359114
commit 01104d26ea

View file

@ -1247,10 +1247,10 @@ static void StructRef (ExprDesc* Expr)
return; return;
} }
/* If we have a struct pointer that is not already in the primary, load /* If we have a struct pointer that is an lvalue and not already in the
* it now. * primary, load it now.
*/ */
if (IsTypePtr (Expr->Type)) { if (ED_IsLVal (Expr) && IsTypePtr (Expr->Type)) {
/* Load into the primary */ /* Load into the primary */
ExprLoad (CF_NONE, Expr); ExprLoad (CF_NONE, Expr);