]> git.gag.com Git - fw/sdcc/commitdiff
* src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 27 Nov 2003 09:14:51 +0000 (09:14 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 27 Nov 2003 09:14:51 +0000 (09:14 +0000)
* src/SDCCast.c (astErrors): fixed bug #846007
* src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3031 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCast.c
src/SDCClrange.c
src/SDCCsymt.c

index 5fdaf8cc12c9c99da7ae90f2568713cf83c025f9..2e93c089bfccffcdd8658053e744fcb3ce995a51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-11-27 Erik Petrich <epetrich@ivorytower.norman.ok.us>
+
+       * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
+       * src/SDCCast.c (astErrors): fixed bug #846007
+       * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
+
 2003-11-26 Erik Petrich <epetrich@ivorytower.norman.ok.us>
 
        * src/SDCCast.c (decorateType): disabled a transformation I added in
index a0fe596018246c8bf72eb8ab948ed580d540897f..e21105ca710c613f11c4dcd0f8b50945e006bf64 100644 (file)
@@ -5715,6 +5715,12 @@ int astErrors(ast *t)
     {
       if (t->isError)
         errors++;
+  
+      if (t->type == EX_VALUE
+          && t->opval.val->sym
+          && t->opval.val->sym->undefined)
+        errors++;
+
       errors += astErrors(t->left);
       errors += astErrors(t->right);
     }
index 58e2f61614ee5771d8bc87b2d051d8185e8623e8..22dada220a9df8553f88fa5ba7a7083e0f6123cc 100644 (file)
@@ -287,7 +287,7 @@ check_successors:
 
   if (retval)
     {
-      markAlive (ic, ebp->ech, sym->key);
+      if (ic) markAlive (ic, ebp->ech, sym->key);
       return 1;
     }
 
@@ -469,10 +469,12 @@ rlivePoint (eBBlock ** ebbs, int count)
       alive = succ->sch->rlive;
       while ((succ = setNextItem (ebbs[i]->succList)))
         {
-         alive = bitVectIntersect (alive, succ->sch->rlive);
+         if (succ->sch)
+            alive = bitVectIntersect (alive, succ->sch->rlive);
        }
 
-      alive = bitVectCplAnd ( bitVectCopy (ebbs[i]->ech->rlive), alive);
+      if (ebbs[i]->ech)
+        alive = bitVectCplAnd ( bitVectCopy (ebbs[i]->ech->rlive), alive);
 
       for (key = 1; key < alive->size; key++)
         {
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);