> -----Original Message----- > From: Georg-Johann Lay [mailto:a...@gjlay.de] > Sent: Monday, March 30, 2009 12:31 PM > To: avr-gcc-list@nongnu.org > Cc: Weddington, Eric; Anatoly Sokolov > Subject: Re: [avr-gcc-list] [WinAVR 20090313] Bug in > split-Pattern for swap > > Georg-Johann Lay schrieb: > > Hi guys, in pass .166r.split1, avr-gcc makes a wrong > transformation for > > the following testcase, compiled with -O: > > > > void g(unsigned char); > > > > void f1(unsigned x) > > { > > unsigned char y; > > y = (x >> 12) & 0x0F; > > g(y); > > } > To be more specific, I attached the asm output for the even > simpler test > case > > char f1 (unsigned x) > { > return x >> 12; > } > > compiled with -mmcu=atmega168 -O -fverbose-asm -dp -S. > > The bug is also triggered for right shifts by 14 and 13, and also for > WinAVR-20080512. > > The bug is also present in a patched avr-gcc 4.3.3 distro at > http://packages.debian.org/en/sid/gcc-avr. However, I cannot > reproduce > the bug with avr-gcc built from svn gcc_4_3_3_release and therefore I > cannot say if the mentioned split patterns are the very > problem or just > reveal an other bug somewhere else.
It probably comes from the attached patch. This was a fix for GCC bug #11259: <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11259> This was committed in 4.4. Eric Weddington
41-gcc-4.3.2-bug-11259_v3.patch
Description: 41-gcc-4.3.2-bug-11259_v3.patch
_______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list