|
| From: | Russell Shaw |
| Subject: | Re: [avr-libc-dev] [bugs #11396] Large number jumps to hyperspace |
| Date: | Sun, 26 Dec 2004 21:54:29 +1100 |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4 |
Joerg Wunsch wrote:
As anonymous wrote:Summary: Large number jumps to hyperspaceOriginal Submission: This code: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.15Sounds more like a GCC bug to me. 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?
It's a total pain trying to find tool bugs by looking at the
asm output in a simulator. I've been looking at:
#include<inttypes.h>
int
main(void)
{
uint16_t baud=9600;
uint16_t reg=16000000/(16*baud) - 1;
return 0;
}
using gcc flags to put out rtl code (it'll take me a while
to understand it).
| [Prev in Thread] | Current Thread | [Next in Thread] |