Sadly pocc x64 have problems with optimizations.
Agree, it is hit or miss sometimes. If you can narrow the issue to a module
#pragma optimize( none ) at the top
can be used to exclude just that code module from global optimization. I've had to do that in a program or two.
The optimization, to me at least, is opaque. Could be helpful if there was a verbose report on
the optimizer actions. This might point to a coding style that fails to optimize correctly ??
John Z