let's not assume it is a symbol
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 7 Oct 2001 13:21:54 +0000 (13:21 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 7 Oct 2001 13:21:54 +0000 (13:21 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1366 4a8a32a2-be11-0410-ad9d-d568d2c75423

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) {