[Top][All Lists]

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

[avr-gcc-list] avr-gcc (GCC) 3.4.5 Bug: copying structure through pointe

From: cajus . hahn
Subject: [avr-gcc-list] avr-gcc (GCC) 3.4.5 Bug: copying structure through pointer will destroy the pointer
Date: Mon, 6 Feb 2006 08:54:46 +0100

there is a bug in avr-gcc (GCC) 3.4.5, that comes with the latest WinAVR
distribution (20060125).
The  avr-gcc (GCC) 3.4.3, that comes with WinAVR 20050214 does NOT contain
this bug.
The bug exists with and without optimization (I tried -O0 and -Os)
If you try to copy a structure with
 *struct_pointer = struct;
the struct_pointer gets destroyed.
The assembler code generated seems to add one structure length foreach
copied byte to the pointer.
The complete code is attached. (there I use  *struct_pointer++, but it is
the same problem there).

(See attached file: GCC_Error.zip)


Attachment: GCC_Error.zip
Description: Zip archive

reply via email to

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