From: kvigor Date: Tue, 29 Feb 2000 06:18:07 +0000 (+0000) Subject: Fix double pointer bug X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=be0a4190ccbea62b460f40580e370f283f9ea3dd;p=fw%2Fsdcc Fix double pointer bug git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@138 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCicode.c b/src/SDCCicode.c index 46119d3e..69de4a7b 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -2065,10 +2065,14 @@ operand *geniCodeDerefPtr (operand *op) } /* now get rid of the pointer part */ - if (lvaluereq && IS_ITEMP(op)) + if (lvaluereq && IS_ITEMP(op) && !IS_PTR(optype->next)) + { retype = getSpec(rtype = copyLinkChain(optype)) ; + } else + { retype = getSpec(rtype = copyLinkChain(optype->next)) ; + } /* if this is a pointer then outputclass needs 2b updated */ if (IS_PTR(optype))