Well, The Optimiser has always worked well for me over the last 20 years. When in doubt, you can always switch all optimisation off. I remember the DOS days of more than 30 years ago where we wrote in Assembly, and we had a Friday afternoon party for someone saving 100 bytes or more in the final target, by writing smarter code by hand. These days are thankfully gone. Optimisation is typically switched off for Debug Builds. If you could debug your code at all, even using assembly, it is still unlikely that the optimisation has anything to do with it. If the optimizer had a bug in it, there would soon be a worldwide outcry. The likelihood is that you wrote suspect code. I cannot judge that until I see the offending code. Now, rest assured, and learn this from an old timer. I have often banged my head against the wall about coding issues. Blamed the Compiler, Blamed Windows, etc. In the end, on calm review and reflection, it has always turned out to be a 'misconception' somewhere in the process, solely conceived on my behalf. If your code works in Debug, but not Retail mode, there are several articles on the internet, about 'Surviving the Release Mode' Regards and Sympathy, :)
Bram van Kampen