Pointers - Applied function ptr patch from Steve Tell. Fixed bugs with
[fw/sdcc] / src / pic / ralloc.c
index c02badaca727d06e4b4512e4e2228f0012f81121..4307f236a2ae88d67b582c32bee1d923130a34b3 100644 (file)
@@ -2436,14 +2436,22 @@ regTypeNum ()
 
       /* if used in return only then we don't 
         need registers */
-      if (sym->ruonly || sym->accuse) {
+      if (sym->accuse) {
        if (IS_AGGREGATE (sym->type) || sym->isptr)
          sym->type = aggrToPtr (sym->type, FALSE);
-       debugLog ("  %d - no reg needed - used as a return\n", __LINE__);
+       debugLog ("  %d - no reg needed - accumulator used\n", __LINE__);
 
        continue;
       }
 
+      if (sym->ruonly) {
+       //if (IS_AGGREGATE (sym->type) || sym->isptr)
+       //  sym->type = aggrToPtr (sym->type, FALSE);
+       debugLog ("  %d - used as a return\n", __LINE__);
+
+       //continue;
+      }
+
       /* if the symbol has only one definition &
         that definition is a get_pointer and the
         pointer we are getting is rematerializable and