* device/include/stdarg.h: fixed bug in va_start macro for --xstack
[fw/sdcc] / src / SDCCicode.c
index fe436aa48631ecd53e9fc8d9dea419f9411beabb..aa2c62cca3575625cea98c8ea2e19c396d2c81b7 100644 (file)
@@ -2067,7 +2067,7 @@ geniCodeCast (sym_link * type, operand * op, bool implicit)
       !IS_FIXED (type) &&
       !IS_FIXED (optype) &&
       ((IS_SPEC (type) && IS_SPEC (optype)) ||
-       (!IS_SPEC (type) && !IS_SPEC (optype))))
+       (IS_DECL (type) && IS_DECL (optype) && DCL_TYPE (type) == DCL_TYPE (optype))))
     {
       ic = newiCode ('=', NULL, op);
       IC_RESULT (ic) = newiTempOperand (type, 0);