[Top][All Lists]

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

Re: [avr-gcc-list] WinAVR 20050214 (gcc 3.4.3) and optimizer bug.

From: Vesa Jääskeläinen
Subject: Re: [avr-gcc-list] WinAVR 20050214 (gcc 3.4.3) and optimizer bug.
Date: Tue, 10 May 2005 01:24:40 +0300
User-agent: Mozilla Thunderbird (Windows/20050412)

Joerg Wunsch wrote:
Vesa Jääskeläinen <address@hidden> wrote:
Thank you for this information. This indeed seems to cure the
problem in this case. But shouldn't this be default for AVR ?

I'm not sure.  On the AVR, memory address 0 is an alias for r0.  Thus,
by dereferencing a NULL pointer, you're touching whatever r0 (rather
r0/r1) points to.  As this can touch anywhere (including memory-mapped
IO devices), the behaviour is completely undefined, and you should
probably avoid that kind of program anyway.

However, the assumption that a pointer is not NULL just because the
program still runs at a certain point is for sure wrong for the AVR,
so I think you should write a bug report for this.

I filed a bug report to here:


Vesa Jääskeläinen

reply via email to

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