[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Bad code generated when using volatile keyword/-O0 op
Re: [avr-gcc-list] Bad code generated when using volatile keyword/-O0 opt?
Mon, 13 Feb 2006 10:13:00 +0100 (MET)
Rick Mann <address@hidden> wrote:
> I've boiled this down to a pretty simple case, I think. In the =20
> following code, if compiled with -Os, if "d" is made volatile, then
> =20 it never seems to get past execution in the first delay loop.
With GCC 3.4.5, the "volatile" keyword and -Os, I get the following
Both delay loops look exactly the same, and I couldn't see why they
would not terminate.
Of course, for a real delay loop, I'd rather recommend you to use the
functions from <util/delay.h>.
J"org Wunsch Unix support engineer