avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)


From: Dmitry K.
Subject: Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)
Date: Wed, 7 Mar 2007 14:12:16 +1000
User-agent: KMail/1.5

On Wednesday 07 March 2007 13:18, Eric Weddington wrote:
[...]
> Going back to your original code, see the resulting attached files:
> bug.lst - The assembler listing after compiling and assembling
> bug.dis - The disassembled output from avr-objdump -d bug.o
>
> These files are generated with avr-gcc 4.1.1 and using -Os.
>
> I still don't see a bug where it goes into an infinite loop. To me it looks
> like that it will eventually break out of the outer loop.
>
> Eric

Yes, I do not see an error in yours code.
But there is a bit of differences:
  - main() is started with pushing r16,17,28,29 into stack
  - stack pointer is not loaded to SP ports, it is modifyed
All of this is absent in my disassembler result.

Are you use non-pure avr-gcc 4.1.1 ?

And can somebody to compile this example?

Dmitry.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]