Small peephole fix
[fw/sdcc] / src / SDCCsymt.c
index 9349511d9f89ec36c717e8c112ad906a43ae8c82..29a16ea4175021512b5c3403a279f5a2f145be87 100644 (file)
@@ -1055,7 +1055,6 @@ checkSClass (symbol * sym)
        SPEC_SCLS (sym->etype) != S_XSTACK &&
        SPEC_SCLS (sym->etype) != S_CONSTANT))
     {
-
       werror (E_AUTO_ASSUMED, sym->name);
       SPEC_SCLS (sym->etype) = S_AUTO;
     }
@@ -1098,7 +1097,8 @@ checkSClass (symbol * sym)
 
   /* if parameter or local variable then change */
   /* the storage class to reflect where the var will go */
-  if (sym->level && SPEC_SCLS (sym->etype) == S_FIXED)
+  if (sym->level && SPEC_SCLS (sym->etype) == S_FIXED &&
+      !IS_STATIC(sym->etype))
     {
       if (options.stackAuto || (currFunc && IS_RENT (currFunc->etype)))
        {
@@ -1620,8 +1620,7 @@ processFuncArgs (symbol * func, int ignoreName)
     {
       /* mark it as a register parameter if
          the function does not have VA_ARG
-         and as port dictates
-         not inhibited by command line option or #pragma */
+         and as port dictates */
       if (!func->hasVargs &&
          (*port->reg_parm) (val->type))
        {
@@ -2186,7 +2185,7 @@ initCSupport ()
                       smuldivmod[muldivmod],
                       ssu[su],
                       sbwd[bwd]);
-             __muldiv[muldivmod][bwd][su] = funcOfType (buffer, __multypes[bwd][su], __multypes[bwd][su], 2, options.intlong_rent);
+              __muldiv[muldivmod][bwd][su] = funcOfType (buffer, __multypes[bwd][su], __multypes[bwd][su], 2, options.intlong_rent);
              SPEC_NONBANKED (__muldiv[muldivmod][bwd][su]->etype) = 1;
              if (bwd < port->muldiv.force_reg_param_below)
                _makeRegParam (__muldiv[muldivmod][bwd][su]);