fixes for generating and evaluating RDs associate with ?$ expressions

This commit is contained in:
Vern Paxson 2021-02-03 16:51:34 -08:00
parent 18bb022dab
commit 5dde3adbdd

View file

@ -820,14 +820,18 @@ TraversalCode RD_Decorate::PreExpr(const Expr* e)
mgr.SetPreFromPre(lhs, a);
mgr.SetPreFromPre(rhs, a);
if ( CheckLHS(lhs, a) )
if ( ! rhs_aggr )
{
if ( ! rhs_aggr )
rhs->Traverse(this);
rhs->Traverse(this);
return TC_ABORTSTMT;
// The RHS could have established a pseudo-RD
// due to a ?$ operation.
mgr.SetPostFromPost(e, rhs);
}
if ( CheckLHS(lhs, a) )
return TC_ABORTSTMT;
if ( rhs_aggr )
{
// No need to analyze the RHS.
@ -987,6 +991,10 @@ TraversalCode RD_Decorate::PreExpr(const Expr* e)
CreateInitPostDef(field_rd, DefinitionPoint(hf),
false, 0);
}
// Don't analyze r itself, since it's not expected
// to be defined here.
return TC_ABORTSTMT;
}
break;