* src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
[fw/sdcc] / src / SDCCsymt.c
index f1d91e3c7871ea2d23c1c115c84bea2a86e83661..56da5bf1d10f54c840da8b136b92029fcd1422c2 100644 (file)
@@ -1851,6 +1851,12 @@ checkFunction (symbol * sym, symbol *csym)
     fprintf (stderr, "checkFunction: %s ", sym->name);
   }
 
+  if (!IS_DECL(sym->type) || DCL_TYPE(sym->type)!=FUNCTION)
+    {
+      werror(E_SYNTAX_ERROR, sym->name);
+      return 0;
+    }
+    
   /* make sure the type is complete and sane */
   checkTypeSanity(((symbol *)sym)->etype, ((symbol *)sym)->name);