Re: [avr-gcc-list] avr-gcc (GCC) 3.4.5 Bug: copying structure through pointer will destroy the pointer

2006-02-06 Thread Dmitry K.
On Tuesday 07 February 2006 07:24, Joerg Wunsch wrote: > [EMAIL PROTECTED] wrote: > > I must have mixed up some of my testing results. Thanks to > > lfmorrison from AVRfreaks. > > Here's the smallest reproducible test case: > > #define STRUCTSIZE 5 > struct a { > char z[STRUCTSIZE]; > }; >

Re: [avr-gcc-list] avr-gcc (GCC) 3.4.5 Bug: copying structure through pointer will destroy the pointer

2006-02-06 Thread Joerg Wunsch
[EMAIL PROTECTED] wrote: > I must have mixed up some of my testing results. Thanks to > lfmorrison from AVRfreaks. Here's the smallest reproducible test case: #define STRUCTSIZE 5 struct a { char z[STRUCTSIZE]; }; extern struct a *ap; extern struct a b; void bug(void) { *ap++ =

[avr-gcc-list] avr-gcc (GCC) 3.4.5 Bug: copying structure through pointer will destroy the pointer

2006-02-06 Thread cajus . hahn
Unlike my previous report *struct_pointer = struct; struct_pointer++; works! But *struct_pointer++ = struct; or memcpy(struct_pointer++, &struct, sizeof(struct)); will not work. I must have mixed up some of my testing results. Thanks to lfmorrison from AVRfreaks. Cajus __

Re: [avr-gcc-list] avr-gcc (GCC) 3.4.5 Bug: copying structure through pointer will destroy the pointer

2006-02-06 Thread Ned Konz
On Feb 5, 2006, at 11:54 PM, [EMAIL PROTECTED] wrote: 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