let's not assume it is a symbol
[fw/sdcc] / src / mcs51 / gen.c
index 4a7e6aba7b036fcb49c26500b5441c5aa1cbc716..630e1192a7bc88ffb423eea45be1efc431080c78 100644 (file)
@@ -4208,6 +4208,9 @@ hasInc (operand *op, iCode *ic)
   iCode *lic = ic->next;
   int isize ;
   
+  /* this could from a cast, e.g.: "(char xdata *) 0x7654;" */
+  if (!IS_SYMOP(op)) return NULL;
+
   if (IS_BITVAR(retype)||!IS_PTR(type)) return NULL;
   isize = getSize(type->next);
   while (lic) {