Thanks, Owen. We're going to be taking a look into it. Not so sure about the results of your patch... I could be wrong, but it looks like it's generating some code that's not needed (addition a variable to 0), plus another inefficiency.
But we'll go over this in the bug report comments. Thanks, Eric Weddington > -----Original Message----- > From: > avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.org > [mailto:avr-gcc-list-bounces+eric.weddington=atmel....@nongnu. > org] On Behalf Of Owen Taylor > Sent: Monday, August 16, 2010 2:19 AM > To: avr-gcc-list@nongnu.org > Subject: [avr-gcc-list] Miscompilation with GCC 4.5.1 / > diagnosis andpossible patch > > [ Not subscribed, please Cc: me on replies ] > > Ran into some miscompilation of 16-bit arithmetic with the AVR backend > in stock GCC 4.5.1. A diagnosis and minimally tested patch can be > found at: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45291 > > Debugging into the GCC internals was more entertaining than digging > through collections of patches for GCC, so it may be that this is > fixed somewhere and just not in upstream GCC. But if not, hopefully > the above is useful. > > - Owen > > _______________________________________________ > AVR-GCC-list mailing list > AVR-GCC-list@nongnu.org > http://lists.nongnu.org/mailman/listinfo/avr-gcc-list > _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list