[Top][All Lists]

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

[avr-gcc-list] Is this possibly a bug in avr-gcc ?

From: Lee Mitchell
Subject: [avr-gcc-list] Is this possibly a bug in avr-gcc ?
Date: Wed, 21 Mar 2001 15:53:24 -0000

Greetings folks,
    My application creates an array of 800 structures in external sram on a
Mega103. The structures are 24 bytes in size.

I also have a pointer of the same type as the structure that i initialise to
point to the first item in the array.
My program does tests on data contained in the array, and uses the pointer
to point to an item, does a test on the data in that item, then increments
the pointer.

My problem is that for 1 entry in the array, the pointer is being calculated
(i'm using  ptr++ to increment the pointer).

I made my program dump the values that were being calculated out of the
serial port, and the relavent info is shown below...

Addr 504 = 0x40b3
Addr 505 = 0x40cb
Addr 506 = 0x40e3
Addr 507 = 0x40fb
Addr 508 = 0x4113
Addr 509 = 0x412b
Addr 510 = 0x4143
Addr 511 = 0x415b
Addr 512 = 0x4173
Addr 513 = 0x418b
Addr 514 = 0x11a3
Addr 515 = 0x41bb
Addr 516 = 0x41d3
Addr 517 = 0x41eb
Addr 518 = 0x4203
Addr 519 = 0x421b
Addr 520 = 0x4233
Addr 521 = 0x424b
Addr 522 = 0x4263
Addr 523 = 0x427b
Addr 524 = 0x4293
Addr 525 = 0x42ab
Addr 526 = 0x42c3

Note the address calculated for entry 514 is completely wrong, although all
values around it are correct.
Is this a bug in avr-gcc or should I shut up and go read my program again
and again ?
If its a bug, is it known and fixed ? cos its screwing my program up and
giving me a headache ;-)

    I'm using the following build of avr-gcc for win32 (from Gunnar Henne's

C:\WINDOWS>avr-gcc -v
Reading specs from C:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.97\specs
Configured with:
./configure --prefix=/avrgcc --exec-prefix=/avrgcc --with-ggc=simple --enabl
e-languages=c --with
included-gettext --with-gc=simple --target=avr --host=i386-mingw32 --build=i
gcc version 2.97 20010108 (experimental)


Lee Mitchell

reply via email to

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