[Bug target/43876] [avr] Improper updating of struct members when written out of order from struct definition

2010-09-20 Thread eric dot weddington at atmel dot com


--- Comment #4 from eric dot weddington at atmel dot com  2010-09-20 17:14 
---
AFAIK, fixed in the latest xmega patch, which is still not upstream.


-- 

eric dot weddington at atmel dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43876



[Bug target/43876] [avr] Improper updating of struct members when written out of order from struct definition

2010-06-08 Thread eric dot weddington at atmel dot com


--- Comment #3 from eric dot weddington at atmel dot com  2010-06-09 02:13 
---
Confirmed.
Testing fix...


-- 

eric dot weddington at atmel dot com changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |eric dot weddington at atmel
   |dot org |dot com
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-06-09 02:13:23
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43876



[Bug target/43876] [avr] Improper updating of struct members when written out of order from struct definition

2010-04-28 Thread justin at mattair dot net


--- Comment #2 from justin at mattair dot net  2010-04-29 02:38 ---
Created an attachment (id=20511)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20511&action=view)
patch for patch-xmega

It looks like possibly a copy-paste error was made in the patch-xmega file. The
following starting on line 573 of patch-xmega (from the
build-avr-gcc-4.3.4-binutils-2.20-libc-1.6.8-insight6.8-dude-5.10-insight-patch
script available on AVRFreaks.net):

+return *l = 4, (AS2 (sbiw,%r0,1)CR_TAB 
+AS2 (st,%p0+,%A1)   CR_TAB
+AS2 (st,%p0,%B1)CR_TAB
+AS2 (sbiw,%r0,2));

I think should be:

+return *l = 4, (AS2 (sbiw,%r0,2)CR_TAB 
+AS2 (st,%p0+,%A1)   CR_TAB
+AS2 (st,%p0,%B1)CR_TAB
+AS2 (sbiw,%r0,1));

This may have been caused by copying code from one of the post-increment
sections utilizing adiw, then converting it to pre-decrement utilizing sbiw,
then forgetting to swap the 2 and 1.

I assume that the second sbiw instruction is needed to put the pointer back at
the location it was at after the first sbiw.
Someone more knowledgeable about GCC's innards should check this.
Attached is a patch for the patch-xmega, um, patch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43876



[Bug target/43876] [avr] Improper updating of struct members when written out of order from struct definition

2010-04-27 Thread justin at mattair dot net


--- Comment #1 from justin at mattair dot net  2010-04-27 19:52 ---
I have upgraded this to critical because it causes data corruption and because
I am not certain how to classify this. Lower if needed.


-- 

justin at mattair dot net changed:

   What|Removed |Added

 CC||justin at mattair dot net
   Severity|normal  |critical


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43876