fixed bug #475821
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 30 Oct 2001 11:00:30 +0000 (11:00 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 30 Oct 2001 11:00:30 +0000 (11:00 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1464 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c

index 38b94995c38bb2d990905a3621c0f67a48be16b0..99e4bef7f7683784d112cbbfc2550d5b1c9cb255 100644 (file)
@@ -259,6 +259,9 @@ copyAst (ast * src)
   dest->level = src->level;
   dest->funcName = src->funcName;
 
+  if (src->ftype)
+    dest->etype = getSpec (dest->ftype = copyLinkChain (src->ftype));
+
   /* if this is a leaf */
   /* if value */
   if (src->type == EX_VALUE)
@@ -279,9 +282,6 @@ copyAst (ast * src)
   /* if this is a node that has special values */
   copyAstValues (dest, src);
 
-  if (src->ftype)
-    dest->etype = getSpec (dest->ftype = copyLinkChain (src->ftype));
-
   dest->trueLabel = copySymbol (src->trueLabel);
   dest->falseLabel = copySymbol (src->falseLabel);
   dest->left = copyAst (src->left);