On Oct 26, 2011, at 9:56 AM, Isaac Marino Bavaresco wrote: > I'm pretty sure that with optimizations on, the compiler > would remove the redundant instructions. It would have to be done at link time rather than compile time, =20 because the actual SFR addresses aren't defined until link time. =20 That's why my original message in this sub-thread was questioning the =20 wisdom of defining SFR addresses at link time. (the redundant =20 instructions are created with (gcc) compiler optimizations turned on; =20 frankly I don't see how they can be avoided if the SFR addresses =20 aren't known at that point. It's not even a gcc "failure to =20 optimize"; it's not having the right info (constants) at the right =20 time...) (Can someone run the code segment through the full optimizing PICC32 =20 compiler and see if it does better? A code segment like this should =20 be sufficient: LATBSET =3D 1; LATBCLR =3D 1; ) BillW --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .