Just out of curiosity, could you show the disassembler output of the OutputWrite() function for gcc-4.6, and gcc-4.7 with -O1 and -O2? # objdump -Sgd <name-of-obj-file> and pasting only this function might be a good way. Regards, Phil