+ else if (transferType == TT_GLOBRETURN)
+ {
+ if (optgenerror
+ (FLG_STATETRANSFER,
+ message
+ ("Function returns with global %q in inconsistent state (%q is %q, should be %q)%q",
+ sRef_unparse (sRef_getRootBase (fref)),
+ sRef_unparse (fref),
+ stateValue_unparseValue (fval, minfo),
+ stateValue_unparseValue (tval, minfo),
+ cstring_isDefined (msg)
+ ? message (": %s", msg) : cstring_undefined),
+ loc))
+ {
+ sRef_showMetaStateInfo (fref, fkey);
+ }
+ }
+ else if (transferType == TT_GLOBPASS)
+ {
+ if (optgenerror
+ (FLG_STATETRANSFER,
+ message
+ ("Function called with global %q in inconsistent state (%q is %q, should be %q)%q",
+ sRef_unparse (sRef_getRootBase (fref)),
+ stateValue_unparseValue (fval, minfo),
+ sRef_unparse (fref),
+ stateValue_unparseValue (tval, minfo),
+ cstring_isDefined (msg)
+ ? message (": %s", msg) : cstring_undefined),
+ loc))
+ {
+ sRef_showMetaStateInfo (fref, fkey);
+ }
+ }
+ else if (transferType == TT_PARAMRETURN)
+ {
+ if (optgenerror
+ (FLG_STATETRANSFER,
+ message
+ ("Function returns with parameter %q in inconsistent state (%q is %q, should be %q)%q",
+ sRef_unparse (sRef_getRootBase (fref)),
+ sRef_unparse (fref),
+ stateValue_unparseValue (fval, minfo),
+ stateValue_unparseValue (tval, minfo),
+ cstring_isDefined (msg)
+ ? message (": %s", msg) : cstring_undefined),
+ loc))
+ {
+ sRef_showMetaStateInfo (fref, fkey);
+ }
+ }
+ else
+ {
+ if (optgenerror
+ (FLG_STATETRANSFER,
+ message
+ ("Invalid transfer from %q %x to %q (%q)%q",
+ stateValue_unparseValue (fval, minfo),
+ sRef_unparse (fref),
+ stateValue_unparseValue (tval, minfo),
+ sRef_unparse (tref),
+ cstring_isDefined (msg)
+ ? message (": %s", msg) : cstring_undefined),
+ loc))
+ {
+ sRef_showMetaStateInfo (fref, fkey);
+ }
+ }
+
+ }
+
+ if (stateValue_getValue (fval) != nval)
+ {
+ stateValue_updateValueLoc (fval, nval, loc);