Applied patch #2762516
[fw/sdcc] / src / SDCCicode.c
index cd1a85ad832a935a8b5f5a4a6af9cebd0f6253eb..fe437728ce97f42e0c4663a2e65b8a25a3f8b5df 100644 (file)
@@ -3191,7 +3191,7 @@ geniCodeConditional (ast * tree,int lvl)
   ast *astTrue  = tree->right->left;
   ast *astFalse = tree->right->right;
   operand *cond = ast2iCode (tree->left, lvl+1);
-  operand *result = newiTempOperand (tree->right->ftype, 0);
+  operand *result = newiTempOperand (tree->ftype, 0);
   operand *opTrue, *opFalse;
 
   ic = newiCodeCondition (geniCodeRValue (cond, FALSE), NULL, falseLabel);
@@ -3980,7 +3980,7 @@ geniCodeCritical (ast *tree, int lvl)
   operand *op = NULL;
   sym_link *type;
 
-  if (!options.stackAuto)
+  if (!options.stackAuto && !TARGET_IS_HC08)
     {
       type = newLink(SPECIFIER);
       SPEC_VOLATILE(type) = 1;