Mail Archives: djgpp/1997/05/10/16:48:31
On Sat, 10 May 1997 02:09:58 GMT, wmcgugan AT netcomuk DOT co DOT uk (William
McGugan) wrote:
>I have a function that crashes with the -O switch set (any value).
>What could cause that, and how can I cure it?
>
Problem solved :)
I had a loop that changed some global variables and called an
assembler function that used these global variables. I think that when
the optimizations were on the compiler used registers instead of
memory references, so the correct values were in registers and not in
memory where the assembler function expected them to be.
Of course, I'm only guessing but I coded the loop completely in
assembler and everything works fine now.
William McGugan.
http://www.netcomuk.co.uk/~wmcgugan
- Raw text -