avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [bugs #11396] Large number jumps to hyperspace


From: Russell Shaw
Subject: Re: [avr-libc-dev] [bugs #11396] Large number jumps to hyperspace
Date: Mon, 27 Dec 2004 10:25:01 +1100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4

Wojtek Kaniewski wrote:
Joerg Wunsch wrote:

 uint16_t baud=9600
 uint16_t reg=16000000/(16*baud) - 1;

makes an atmega16 jump to some spurious place and crash.  Using
avr-libc 1.0.5 avr-gcc (GCC) 3.4.3 GNU avr-ld version 2.15

Anyway, as this code cannot `jump' at all (nothing is really
executed), do you perhaps have a complete compilable example where
this can be reproduced?

what about __udivmodsi4? it's rather obvious that variable `baud' is just an example and in the real code it's not constant. (but yes, it still looks like a GCC bug.)

In the real code, uint16_t baud was set at 9600 using a const literal
passed as an array parameter.




reply via email to

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