]> git.gag.com Git - fw/sdcc/blobdiff - src/SDCCicode.c
a possible fix for bug #460662 part 2
[fw/sdcc] / src / SDCCicode.c
index 919b9526267f06161ca4b4784cc2d0c6beaae5fd..2c99d04a33c50ccb4e8e99a3beda3cc0ba881e45 100644 (file)
@@ -2400,7 +2400,7 @@ geniCodeLogic (operand * left, operand * right, int op)
 
   /* left is integral type and right is literal then
      check if the literal value is within bounds */
-  if (IS_INTEGRAL (ltype) && IS_LITERAL (rtype))
+  if (IS_INTEGRAL (ltype) && IS_VALOP (right) && IS_LITERAL (rtype))
     {
       int nbits = bitsForType (ltype);
       long v = (long) operandLitValue (right);