A skeleton for a regression fix.
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 15 Sep 2001 13:49:10 +0000 (13:49 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 15 Sep 2001 13:49:10 +0000 (13:49 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1271 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCcse.c

index 827431ce719059a6aa4fdf37a2aec6f5e629ca37..45a0aef708ffb048489b391d6b610f53c41f9b08 100644 (file)
@@ -328,9 +328,12 @@ DEFSETFUNC (findCheaperOp)
 
       if ((*opp)->type==VALUE && 
          IS_SYMOP(cop) && IS_GENPTR(OP_SYMBOL(cop)->type)) {
-       // this is a pointer to some space, so we can not
-       *opp=NULL;
-       return 0;
+       // This is a value assigned to a gpointer
+       if (1) {
+         // this value is used for a cast, so we can not
+         *opp=NULL;
+         return 0;
+       }       
       }
 
       return 1;