Applied patch #2762516
[fw/sdcc] / src / regression / nestfor.c
index 8b22cae11c12dd8e7654e0a35f17b715a3270eff..654efe80d5229e49fef24fb9c2d3dc3a1013dcda 100644 (file)
@@ -1,19 +1,13 @@
-#define __16F873
-#include "p16f873.h"
-//#include "p16c84.h"
+#include "gpsim_assert.h"
+#include "picregs.h"
 
-unsigned char success=0;
 unsigned char failures=0;
-unsigned char dummy=0;
 
-bit bit0 = 0;
 unsigned int uint0 = 0;
 unsigned int uint1 = 0;
 unsigned char uchar0 = 0;
 unsigned char uchar1 = 0;
 
-unsigned char call3(void);
-
 void dput(unsigned char val)
 {
        PORTB = val;
@@ -21,11 +15,11 @@ void dput(unsigned char val)
        PORTA = 0x00;
 }
 
-void done()
+void
+done()
 {
-
-  dummy++;
-
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
 
 /* both loops use the loop variable inside the inner loop */
@@ -141,6 +135,5 @@ void main(void)
   for4();
   for5();
 
-  success = failures;
   done();
 }