From be0a4190ccbea62b460f40580e370f283f9ea3dd Mon Sep 17 00:00:00 2001 From: kvigor Date: Tue, 29 Feb 2000 06:18:07 +0000 Subject: [PATCH] Fix double pointer bug git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@138 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCicode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)) -- 2.47.2