From fb5996bbed3f3c1f8fb964c75d4d0842323d9560 Mon Sep 17 00:00:00 2001 From: johanknol Date: Sat, 15 Sep 2001 13:49:10 +0000 Subject: [PATCH] A skeleton for a regression fix. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1271 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCcse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SDCCcse.c b/src/SDCCcse.c index 827431ce..45a0aef7 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -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; -- 2.30.2