projects
/
fw
/
sdcc
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Regression file for testing the nested for-loop bug in the PIC port that Steve Tell...
[fw/sdcc]
/
src
/
regression
/
while.c
1
#define __16F873
2
#include "p16f873.h"
3
//#include "p16c84.h"
4
5
unsigned char success = 0;
6
unsigned char failures = 0;
7
unsigned char dummy = 0;
8
9
bit bit0 = 0;
10
unsigned int aint0 = 0;
11
unsigned int aint1 = 0;
12
unsigned char achar0 = 0;
13
unsigned char achar1 = 0;
14
15
16
void
17
done ()
18
{
19
20
dummy++;
21
22
}
23
24
void
25
while1 (void)
26
{
27
unsigned char i = 10;
28
29
do
30
{
31
achar0++;
32
}
33
while (--i);
34
35
if (achar0 != 10)
36
failures++;
37
38
}
39
40
41
void
42
main (void)
43
{
44
while1 ();
45
46
47
success = failures;
48
done ();
49
}