Fix invalid typecast revealed by -CriotR by changing order of terms in boolean expression

git-svn-id: trunk@43515 -
This commit is contained in:
pierre 2019-11-19 22:47:39 +00:00
parent 37a9cda682
commit 7eb0be6127

View File

@ -780,8 +780,9 @@ implementation
else if not((tloadnode(p).symtableentry.typ in [staticvarsym,localvarsym,paravarsym,fieldvarsym]) and
(tabstractvarsym(tloadnode(p).symtableentry).varregable in [vr_intreg,vr_mmreg,vr_fpureg])) then
inc(result);
if not(tabstractvarsym(tloadnode(p).symtableentry).varregable=vr_addr) and
(tloadnode(p).symtableentry.typ=paravarsym) and tloadnode(p).is_addr_param_load then
if (tloadnode(p).symtableentry.typ=paravarsym) and
not(tabstractvarsym(tloadnode(p).symtableentry).varregable=vr_addr) and
tloadnode(p).is_addr_param_load then
inc(result);
if (result >= NODE_COMPLEXITY_INF) then
result := NODE_COMPLEXITY_INF;