Added simple assertions to help bug tracking
authormichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 20 Aug 2001 04:39:03 +0000 (04:39 +0000)
committermichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 20 Aug 2001 04:39:03 +0000 (04:39 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1156 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/gen.c

index e2dad8775693c7c872394cef1a5926ae8740488f..ccaacd0812d2af1e27efbad4decffc4799656cab 100644 (file)
@@ -273,7 +273,12 @@ static asmop *
 aopForSym (iCode * ic, symbol * sym, bool result)
 {
   asmop *aop;
-  memmap *space = SPEC_OCLS (sym->etype);
+  memmap *space;
+
+  wassertl (ic != NULL, "Got a null iCode");
+  wassertl (sym != NULL, "Got a null symbol");
+
+  space = SPEC_OCLS (sym->etype);
 
   /* if already has one */
   if (sym->aop)