Fixes [bugs:#4054].
When compiling check_cast (*(B *)&a, b);, SDCC generated a dereference while preparing the first argument.
The struct parameter code later treated that result as an address and generated another dereference when copying the argument.
This patch gives the struct argument code the original source address, so the struct is read and copied only once.
Proposed fix:
if (IS_STRUCT (parms->ftype) && IS_DEREF_OP (parms))
parms->opval.oprnd = geniCodeRValue (ast2iCode (parms->left, lvl + 1), FALSE);
else
parms->opval.oprnd = geniCodeRValue (ast2iCode (parms, lvl + 1), FALSE);
The regression test is based on the original testcase.
ChangeLog: