This is interesting, I also had a crash with a do while loop and I now believe that this is a bug in the compiler. Do while lets a previous loop crash. This is the proof:
Code:
int result = 0;
void test1()
{
int i;
for(i = 0; i < 10; i++)
{
result = 1;
}
}
void test2()
{
do {
result = 13;
} while (result != 13);
}
void main()
{
test1();
}
This simple program crashes all the time but works when I replace do..while by while {..}. I believe the previous for loop is somehow trashed by the do while loop. I will report this as a bug.